Пример #1
0
 def __init__(self, story, chapter_name, start_page=1):
     self.story = story  # Inheritance
     self.chapter_name = chapter_name
     self.start_page = start_page
     self.chapter_url = story.chapter_list[chapter_name]
     self.page_list = m_parser.html_parser(story.site_url, "get_page_list", self.chapter_url)
     self.chapter_dir = story.story_dir + "/chapter-" + self.chapter_name
     self.chapter_result = {
         'md5': hashlib.md5(str(self.page_list)).hexdigest(),
         'ctoken': self.story.site_url,
         'url': self.chapter_url,
         'page_list': self.page_list,
         'pages_result': dict(),
         'status': False,
         'quantity': len(self.page_list)
     }
Пример #2
0
 def _get_chapter_list(self):
     if self.story_url:
         return m_parser.html_parser(self.site_url, "get_chapter_list", self.story_url, self.opt_xpath)
     else:
         return None