fix
This commit is contained in:
@@ -23,7 +23,8 @@ class baseComic:
|
||||
comics = ListComic.getListComicsLinksUpdateAt()
|
||||
if comics == None: return False
|
||||
(book_name,comic_href,updated) = [comics[0],comics[1],comics[2]]
|
||||
return cls.updateOneComic(book_name,comic_href,updated,chapters_xpath)
|
||||
cls.updateOneComic(book_name,comic_href,updated,chapters_xpath)
|
||||
return True
|
||||
|
||||
@classmethod
|
||||
def updateOneComic(cls,book_name,comic_href,update_at,chapters_xpath):
|
||||
|
||||
+5
-2
@@ -13,7 +13,10 @@ class comicEntity:
|
||||
ListComic.setListComicName(books,"name")
|
||||
ListComic.setListComicChapterLink(books,"id",start_add=pathStr.getBaseUrl(url)+"/books/")
|
||||
ListComic.setListComicUpdateAt(books,"updatedAt")
|
||||
return baseComic.updateComics(chapters_xpath='//div[contains(@class,"bookid_chapterBox")]//div[contains(@class,"bookid_chapter")]/a/text()')
|
||||
is_next = True
|
||||
while is_next:
|
||||
is_next = baseComic.updateComics(chapters_xpath='//div[contains(@class,"bookid_chapterBox")]//div[contains(@class,"bookid_chapter")]/a/text()')
|
||||
cls.oneComic()
|
||||
|
||||
@classmethod
|
||||
def oneComic(cls,sleep=None):
|
||||
@@ -37,4 +40,4 @@ class comicEntity:
|
||||
|
||||
@classmethod
|
||||
def start(cls,url):
|
||||
while cls.downladsComcis(url): cls.oneComic()
|
||||
cls.downladsComcis(url)
|
||||
Reference in New Issue
Block a user