fix
This commit is contained in:
parent
ea7005356c
commit
aec2242852
@ -14,7 +14,7 @@ class comicEntity:
|
||||
@classmethod
|
||||
def downladsComcis(cls,url):
|
||||
#漫画名
|
||||
books = cls.booksJson(url)
|
||||
books = cls.booksJson(url,update=True)
|
||||
for x in range(0, len(books)):
|
||||
comicInfo.setComicInfo(comicname=books[x].get("name"),
|
||||
current_chapter_img=comicInfo.getBaseUrl(url)+"/books/"+books[x].get("id"),
|
||||
|
||||
@ -53,9 +53,7 @@ class htmlUtils:
|
||||
@classmethod
|
||||
def getHTML(cls, curl,type=None,update=False):
|
||||
url_text = None
|
||||
retries = Retry(total=1,
|
||||
backoff_factor=0.1,
|
||||
status_forcelist=[ 500, 502, 503, 504 ])
|
||||
retries = Retry(total=1, backoff_factor=0.1, status_forcelist=[ 500, 502, 503, 504 ])
|
||||
s = requests.Session()
|
||||
s.mount('http://', HTTPAdapter(max_retries=retries))
|
||||
s.mount('https://', HTTPAdapter(max_retries=retries))
|
||||
@ -101,7 +99,8 @@ class htmlUtils:
|
||||
return cls.getHTML(url,type="bytes")
|
||||
|
||||
@classmethod
|
||||
def getJSON(cls,url,update=False):
|
||||
def getJSON(cls,url,update=False,test=True):
|
||||
json_data = cls.getHTML(url,type="json")
|
||||
return cls.getHTML(url,type="json")
|
||||
|
||||
@classmethod
|
||||
|
||||
Loading…
Reference in New Issue
Block a user