示例#1
0
 def get_chapters(self, manga_url: str) -> 'List[Chapter]':
     soup = BeautifulSoup(self.get_str(manga_url), 'html.parser')
     chapters = [
         Chapter('', get_text(a), a['href'])
         for a in soup.find('ul', class_='chapters').find_all('a')
     ]
     chapters.reverse()
     return chapters
示例#2
0
 def get_chapters(self, manga_url: str) -> 'List[Chapter]':
     soup = BeautifulSoup(self.get_str(manga_url), 'html.parser')
     chapters = [
         Chapter('', a['title'], a['href'])
         for a in soup.find('section', id='examples').find_all('a')
     ]
     chapters.reverse()
     return chapters
示例#3
0
 def get_chapters(self, manga_url: str) -> 'List[Chapter]':
     soup = BeautifulSoup(self.get_str(manga_url), 'html.parser')
     chapters = [
         Chapter('', get_text(a), self.site_url + a['href'])
         for a in soup.find('table', id='listing').find_all('a')
     ]
     # don't need to use `chapters.reverse()` here
     return chapters
示例#4
0
 def get_chapters(self, manga_url: str) -> 'List[Chapter]':
     soup = BeautifulSoup(self.get_str(manga_url), 'html.parser')
     ulist = soup.find('div', class_='detail_list').ul
     chapters = [
         Chapter('', get_text(a), 'http:' + a['href'])
         for a in ulist.find_all('a')
     ]
     chapters.reverse()
     return chapters
示例#5
0
 def get_chapters(self, manga_url: str) -> 'List[Chapter]':
     soup = BeautifulSoup(self.get_str(manga_url), 'html.parser')
     div = soup.find('div', class_='chapter-list')
     chapters = []
     for anchor in div.find_all('a'):
         if anchor['href'].startswith('/'):
             anchor['href'] = 'https:' + anchor['href']
         chapters.append(Chapter('', get_text(anchor), anchor['href']))
     chapters.reverse()
     return chapters
示例#6
0
 def get_chapters(self, manga_url: str) -> 'List[Chapter]':
     soup = BeautifulSoup(self.get_str(manga_url), 'html.parser')
     tag = soup.find('div', class_='warning')
     if tag:
         soup = BeautifulSoup(self.get_str(tag.a['href']), 'html.parser')
     tag = soup.find('div', class_='silde')
     chapters = [
         Chapter('', a['title'], a['href'])
         for a in tag.find_all('a', class_='chapter_list_a')
     ]
     chapters.reverse()
     return chapters