fix crash
This commit is contained in:
parent
0c202b968f
commit
ae00abcdb2
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue