File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 11__pycache__
2+ . *
3+ ! .gitignore
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ def anaysisURL(self):
128128
129129 except getComic .ErrorCode as e :
130130 if e .code == 2 :
131- self .statusLabel .setText ('<font color="red">无法跳转为移动端URL,请使用http ://m.ac.qq.com </font>' )
131+ self .statusLabel .setText ('<font color="red">无法跳转为移动端URL,请进入http ://m.ac.qq.com找到该漫画地址 </font>' )
132132
133133 except KeyError :
134134 self .statusLabel .setText ('<font color="red">不存在的地址</font>' )
Original file line number Diff line number Diff line change @@ -50,16 +50,16 @@ def getId(url):
5050 if not numRE .search (url ):
5151 get_id_request = requestSession .get (url )
5252 url = get_id_request .url
53- if not isLegelUrl (url ):
53+ id = numRE .findall (url )
54+ if not isLegelUrl (url ) or not id :
5455 print ('无法自动跳转移动端URL,请进入http://m.ac.qq.com,找到'
5556 '该漫画地址。\n '
5657 '地址应该像这样: '
5758 'http://m.ac.qq.com/Comic/comicInfo/id/xxxxx (xxxxx为整数)' )
5859 raise ErrorCode (2 )
5960
60- id = numRE .findall (url )[0 ]
6161
62- return id
62+ return id [ 0 ]
6363
6464def getContent (id ):
6565 getComicInfoUrl = 'http://m.ac.qq.com/GetData/getComicInfo?id={}' .format (id )
You can’t perform that action at this time.
0 commit comments