mirror of
https://github.com/xdtianyu/scripts.git
synced 2025-09-23 12:29:22 +08:00
fix crash
This commit is contained in:
@@ -54,6 +54,7 @@ for td, table in itertools.izip(td_list, table_list):
|
|||||||
|
|
||||||
info_r = requests.get(info_url + str(u2torrent.id), cookies=cookies)
|
info_r = requests.get(info_url + str(u2torrent.id), cookies=cookies)
|
||||||
|
|
||||||
|
try:
|
||||||
info_soup = BeautifulSoup(info_r.text)
|
info_soup = BeautifulSoup(info_r.text)
|
||||||
|
|
||||||
info_name = info_soup.find("span", {'class': 'title'}, text="[name]").parent.find("span", {'class': 'value'})
|
info_name = info_soup.find("span", {'class': 'title'}, text="[name]").parent.find("span", {'class': 'value'})
|
||||||
@@ -65,6 +66,8 @@ for td, table in itertools.izip(td_list, table_list):
|
|||||||
|
|
||||||
torrents.append(json.JSONDecoder().decode(u2torrent.json()))
|
torrents.append(json.JSONDecoder().decode(u2torrent.json()))
|
||||||
count += 1
|
count += 1
|
||||||
|
except AttributeError:
|
||||||
|
print "Fetch folder name failed: " + u2torrent.title
|
||||||
time.sleep(3)
|
time.sleep(3)
|
||||||
|
|
||||||
torrents_dict["count"] = count
|
torrents_dict["count"] = count
|
||||||
|
Reference in New Issue
Block a user