Example #1
0
 def _chapters(self, soup):
     table = soup.find('table', {'id': 'listing'})
     return [
         objdict({
             'url': self.base_url + a['href'],
             'name': a.string.strip()
         }) for a in reversed(table.find_all('a'))
     ]
Example #2
0
 def chapter_info(self, html):
     pages = self._chapter_pages(html)
     soup = BeautifulSoup(html, 'html.parser')
     name = self._chapter_name(soup)
     series_url = self._chapter_series_url(soup)
     prev, next = self._chapter_prev_next(soup)
     return objdict({
         'name': name,
         'pages': pages,
         'series_url': series_url,
         'next_chapter_url': next,
         'prev_chapter_url': prev,
     })
Example #3
0
 def chapter_info(self, html):
     pages = self._chapter_pages(html)
     soup = BeautifulSoup(html, 'html.parser')
     name = self._chapter_name(soup)
     series_url = self._chapter_series_url(soup)
     prev, next = self._chapter_prev_next(soup)
     return objdict({
         'name': name,
         'pages': pages,
         'series_url': series_url,
         'next_chapter_url': next,
         'prev_chapter_url': prev,
     })
Example #4
0
    def search_series(self, keyword):
        url = 'http://www.mangapanda.com/search/'
        params = {
            'w': keyword,
        }
        resp = _post(url, params=params)

        soup = BeautifulSoup(resp.content, 'html.parser')
        manga_names = soup.find_all('div', {'class': 'manga_name'})
        atags = [name.find('h3').a for name in manga_names]
        return [objdict({'name': a.text.strip(),
                         'url': self.base_url + a['href'],
                         'site': self.name}) for a in atags]
Example #5
0
    def search_series(self, keyword):
        url = 'http://kissmanga.com/Search/SearchSuggest'
        params = {
            'type': 'Manga',
            'keyword': keyword,
        }
        resp = self._post(url, params=params)

        # Kissmanga returns manga series and links in xml format
        soup = BeautifulSoup(resp.content, 'html.parser')
        atags = soup.find_all('a')
        return [objdict({'name': a.string.strip(),
                         'url': a['href'],
                         'site': self.name}) for a in atags]
Example #6
0
    def search_series(self, keyword):
        url = 'http://kissmanga.com/Search/SearchSuggest'
        params = {
            'type': 'Manga',
            'keyword': keyword,
        }
        resp = _post(url, params=params)

        # Kissmanga returns manga series and links in xml format
        soup = BeautifulSoup(resp.content, 'html.parser')
        atags = soup.find_all('a')
        return [objdict({'name': a.text.strip(),
                         'url': a['href'],
                         'site': self.name}) for a in atags]
Example #7
0
    def search_by_author(self, author):
        url = 'http://kissmanga.com/AuthorArtist/' + author.replace(' ', '-')
        resp = self._get(url)

        soup = BeautifulSoup(resp.content, 'html.parser')
        table = soup.find('table', class_='listing')

        if table is None:  # no author of this name
            return []

        return [objdict({
            'name': a.text.strip(),
            'url': 'http://kissmanga.com' + a['href'],
            'site': self.name,
        }) for a in table.find_all('a') if len(a['href'].split('/')) == 3]
Example #8
0
    def search_by_author(self, author):
        url = 'http://kissmanga.com/AuthorArtist/' + author.replace(' ', '-')
        resp = _get(url)

        soup = BeautifulSoup(resp.content, 'html.parser')
        table = soup.find('table', class_='listing')

        if table is None:  # no author of this name
            return []

        return [objdict({
            'name': a.text.strip(),
            'url': 'http://kissmanga.com' + a['href'],
            'site': self.name,
        }) for a in table.find_all('a') if len(a['href'].split('/')) == 3]
Example #9
0
    def search_series(self, keyword):
        url = 'http://www.mangapanda.com/search/'
        params = {
            'w': keyword,
        }
        resp = _post(url, params=params)

        soup = BeautifulSoup(resp.content, 'html.parser')
        manga_names = soup.find_all('div', {'class': 'manga_name'})
        atags = [name.find('h3').a for name in manga_names]
        return [
            objdict({
                'name': a.text.strip(),
                'url': self.base_url + a['href'],
                'site': self.name
            }) for a in atags
        ]
Example #10
0
 def series_info(self, html):
     soup = BeautifulSoup(html, 'html.parser')
     chapters = self._chapters(soup)
     thumb_url = self._thumbnail_url(soup)
     tags = self._tags(soup)
     name = self._name(soup)
     status = self._status(soup)
     descriptions = self._descriptions(soup)
     authors = self._authors(soup)
     return objdict({
         'site': self.name,
         'chapters': chapters,
         'thumb_url': thumb_url,
         'tags': tags,
         'name': name,
         'status': status,
         'descriptions': descriptions,
         'authors': authors,
     })
Example #11
0
 def series_info(self, html):
     soup = BeautifulSoup(html, 'html.parser')
     chapters = self._chapters(soup)
     thumb_url = self._thumbnail_url(soup)
     tags = self._tags(soup)
     name = self._name(soup)
     status = self._status(soup)
     description = self._description(soup)
     authors = self._authors(soup)
     return objdict({
         'site': self.name,
         'chapters': chapters,
         'thumb_url': thumb_url,
         'tags': tags,
         'name': name,
         'status': status,
         'description': description,
         'authors': authors,
     })
Example #12
0
 def _chapters(self, soup):
     table = soup.find('table', class_='listing')
     return [objdict({'url': 'http://kissmanga.com' + a['href'],
                      'name': a.string.strip()})
             for a in table.find_all('a')]
Example #13
0
 def _chapters(self, soup):
     table = soup.find('table', class_='listing')
     return [objdict({'url': 'http://kissmanga.com' + a['href'],
                      'name': a.string.strip()})
             for a in table.find_all('a')]
Example #14
0
 def _chapters(self, soup):
     table = soup.find('table', {'id': 'listing'})
     return [objdict({'url': self.base_url + a['href'],
                      'name': a.string.strip()})
             for a in reversed(table.find_all('a'))]