Skip to content

Commit

Permalink
修复bug
Browse files Browse the repository at this point in the history
  • Loading branch information
abcfy2 committed Oct 3, 2014
1 parent c9abc5d commit 319863c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions getComic.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def getId(url):

numRE = re.compile(r'\d+$')

if not numRE.search(url):
id = numRE.findall(url)
if not id:
get_id_request = requestSession.get(url)
url = get_id_request.url
id = numRE.findall(url)
Expand All @@ -57,9 +58,8 @@ def getId(url):
'地址应该像这样: '
'http://m.ac.qq.com/Comic/comicInfo/id/xxxxx (xxxxx为整数)')
raise ErrorCode(2)


return id[0]

return id[0]

def getContent(id):
getComicInfoUrl = 'http://m.ac.qq.com/GetData/getComicInfo?id={}'.format(id)
Expand Down

0 comments on commit 319863c

Please sign in to comment.