Skip to content
This repository has been archived by the owner on Nov 28, 2019. It is now read-only.

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sdvcrx committed Oct 28, 2018
1 parent ea1a157 commit 1616241
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bddown_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def get_file_infos(self, link, secret=None):
js = None
try:
js = self._get_js(link, secret)
except IndexError, e:
except IndexError:
# Retry with new cookies
js = self._get_js(link, secret)

Expand All @@ -230,7 +230,7 @@ def get_file_infos(self, link, secret=None):
def bd_get_files(self, shareinfo, path):
# Let's do a maximum of 100 pages
file_list = []
for page in xrange(1, 100):
for page in range(1, 100):
print('Fetching page', page)
file_list_new = self.bdlist(shareinfo, path, page)
file_list.extend(file_list_new)
Expand All @@ -255,7 +255,7 @@ def verify_passwd(self, url, secret=None):
pwd = secret
else:
# FIXME: Improve translation
pwd = raw_input("Please input this sharing password\n")
pwd = input("Please input this sharing password\n")
data = {'pwd': pwd, 'vcode': '', 'vcode_str': ''}
verify_url = "{0}&t={1}&channel=chunlei&clienttype=0&web=1".format(url.replace('init', 'verify'), int(time()))
logger.debug(url, extra={'type': 'url', 'method': 'POST'})
Expand Down Expand Up @@ -332,7 +332,7 @@ def match(self, js):
_filename = re.search(self.filename_pattern, js)
if _filename:
self.filename = _filename.group(1).decode('unicode_escape')

data = re.findall(self.pattern, js)[0]
if not data:
return False
Expand Down

0 comments on commit 1616241

Please sign in to comment.