忘记改了什么

This commit is contained in:
ricterz
2015-04-19 18:56:03 +08:00
parent 77d6fe931f
commit b4d261a483
2 changed files with 9 additions and 2 deletions

View File

@@ -14,7 +14,12 @@ def dojinshi_parser(id):
dojinshi['id'] = id
url = '%s/%d/' % (DETAIL_URL, id)
response = requests.get(url).content
try:
response = requests.get(url).content
except Exception, e:
logger.critical('%s%s' % tuple(e.message))
sys.exit()
html = BeautifulSoup(response)
dojinshi_info = html.find('div', attrs={'id': 'info'})