pymanga.parsers package
Submodules
pymanga.parsers.adv_search_parser module
- pymanga.parsers.adv_search_parser.parse_results(soup)
Parse search results from the advanced search page.
- Parameters
content (BeautifulSoup) – BeautifulSoup object of the search page content.
- Returns
results – List of search results.
[ { 'name': 'Series Name', 'id': 'Series ID', 'rating': 'Average Rating', 'summary': 'Short summary', 'thumbnail': 'Thumbnail link' or None, 'year': 'Year manga started releasing', 'is_adult': True or False # note! mangaupdates categorizes whole genres like 'Yuri' as adult # so use this at your own discretion :) # if this is true, thumbnail will always be None. } ]
- Return type
list of dicts
pymanga.parsers.releases_parsers module
- pymanga.parsers.releases_parsers.parse_releases(content)
Parse latest releases of a manga
- Parameters
content (BeautifulSoup) – BeautifulSoup object of the releases page content.
- Returns
releases – List of latest releases of a manga. List is ordered latest-to-oldest
[ { 'chapter': 'chapter number', 'vol': 'volume number' or None, 'series': { 'name': 'Manga Name', 'id': 'Manga ID' }, 'group': { 'name': 'Scanlation Group Name', 'id': 'Scanlation Group ID' } } ]
- Return type
list of dicts
pymanga.parsers.search_parsers module
- pymanga.parsers.search_parsers.parse_authors(list)
Parse authors from a MangaUpdate’s search results page.
- Parameters
list (BeautifulSoup) – BeautifulSoup object of the authors section of the search results page.
- Returns
series – List of authors found by the search.
[ { 'name': 'Author Name', 'id': 'ID', 'series': int(Number of series author has done), 'genres': ['Genre',...] # most numerous genre(s) # in this author's work } ]
- Return type
list of dict
- pymanga.parsers.search_parsers.parse_releases(list)
Parse releases from a MangaUpdate’s search results page.
- Parameters
list (BeautifulSoup) – BeautifulSoup object of the releases section of the search page.
- Returns
releases – List of recent releases found by the search.
[ { 'id': 'Series Id', 'name': 'Series name', 'chp': 'chapter number', 'vol': 'number' or None, 'date': '02/21/21', # Date in month/day/year 'group': { 'name': 'Scanlation Group', 'id': 'Scanlation Group Id' } } ]
- Return type
list of dicts
- pymanga.parsers.search_parsers.parse_scanlators(list)
Parse scanlation groups from a MangaUpdate’s search results page.
- Parameters
list (BeautifulSoup) – BeautifulSoup object of the scanlators section of the search results page.
- Returns
scanlators – List of scanlation groups found by the search.
[ { 'name': 'Scanlation Group Name', 'id': 'Scanlation Group ID', 'active': True or False, 'contact': [ 'contact link', ... ] } ]
- Return type
list of dicts
- pymanga.parsers.search_parsers.parse_series(list)
Parse series from a MangaUpdate’s search results page.
- Parameters
list (BeautifulSoup) – BeautifulSoup object of the series section of the search results page.
- Returns
series – List of manga found by the search.
[ { 'name': 'Manga Name', 'id': 'Manga Id', 'rating': '7.80' # average (?) rating of manga on mangaupdates, 'year': '2018', # year manga started releasing 'genres': ['Drama', 'Shoujo Ai', 'S...'] # genres this series is a part of # (note: sometimes, the last item of this will be cut off with ...) } ]
- Return type
list of dicts
pymanga.parsers.series_parsers module
- pymanga.parsers.series_parsers.parse_series(content, description_format='markdown')
Parse series info from mangaupdates.
- Parameters
content (BeautifulSoup) – BeautifulSoup object of series page html.
description_format (str, optional) – Format to transform the description into. can be ‘plain’, ‘raw’ or ‘markdown’. defaults to ‘markdown’.
- Returns
series – Series information.
{ # main info 'title': 'Series Name', 'year': 'type': 'Type of series (manhwa,manhua,manga,et)', 'status': 'n Volumes (Ongoing or Complete or etc..)' 'image': 'cover image link', 'last_updated': 'December 3rd 2020, 5:32pm PST', # last time page was updated # authors & artists 'artists': [ { 'id': 'Artist's Manga Updates ID', 'name': 'Artist's Name' } ], 'authors': [ { 'id': 'Author's Manga Updates ID', 'name': 'Author's Name' } ], # relations 'associated_names': [ # often in different languages, so make sure you can handle unicode. 'Name one', 'Name two' ], 'related_series': [ { 'id': 'Related Series ID', 'name': 'Related Series Name', 'relation': 'Relation to current manga' } ], 'anime_chapters': [ # if it doesn't have an anime, list will be empty 'Starts at Vol x, Chap y', 'Ends at Vol z, Chap w' ], # description & genre 'genres': [ 'Genre', ... ], 'categories': [ { 'category': 'Category Name', 'score': '16 (16,0)' } ], 'description': 'Lorem ipsum dolor sit amet..', # publishing info 'publisher': { 'id': 'publisher ID', 'name': 'publisher name' }, 'serialized': { 'link': 'mangaupdates link to where it was serialized', 'name': 'name of where it was serialized' }, 'licensed': True or False # whether this series was licensed in english, 'english_publisher': { 'id': 'English Publisher ID', 'name': 'English Publisher Name + Volume Info' }, # scanlation info 'completely_scanlated': True or False, 'latest_releases': [ { 'chapter': 'chapter number', 'volume': 'volume number if present', 'date': 'n days ago', 'group': { 'id': 'Scanlation Group ID', 'name': 'Scanlation Group Name' } } ], 'groups': [ # all scanlation groups that published releases for this series { 'id': 'Scanlation Group ID', 'name': 'Scanlation Group Name' } ], # recommendations 'category_recs': [ { 'id': 'Recommended Series ID', 'name': 'Recommended Series Name' } ], 'recs': [ { 'id': 'Recommended Series ID', 'name': 'Recommended Series Name' } ], # user-related info 'positions': { 'monthly': '779', 'monthly_change': '+155', 'six_monthly': '1244', 'six_monthly_change': '+76', 'tri_monthly': '1120', 'tri_monthly_change': '-17', 'weekly': '431', 'weekly_change': '+121', 'yearly': '1277', 'yearly_change': '-162' }, 'average': { # ratings 'average': 'average rating', 'bayesian': 'bayesian average rating', 'votes': 'n votes' }, 'reading_lists': { 'custom': 'n', 'reading': 'n', 'unfinished': 'n', 'wish': 'n' }, 'forum': { 'link': 'https://www.mangaupdates.com/topics.php?fid=120202', 'status': 'None' } }
- Return type
dict