diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ec54984..dbf6fd8 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,7 +1,13 @@ - +========= Changelog ========= +Development +----------------------------------------- + +* Fix various issues on anime pages +* Rename `retrieve_anime` to `get_anime` for consistency (backwards-incompatible) + 0.2.1 (2017-05-01) ----------------------------------------- diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 9b68643..d0f71fe 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -1,6 +1,6 @@ -============ -Contributing -============ +======================== +Contributing/Development +======================== Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given. diff --git a/README.rst b/README.rst index 780a329..73d1d6f 100644 --- a/README.rst +++ b/README.rst @@ -51,14 +51,17 @@ Overview MyAnimeList web scraper is a Python library for gathering data for analysis. -Usage -===== +Installation & Usage +==================== -Use the `online documentation `_, and just:: +Installation is simple:: pip install mal-scraper -We follow `Semantic Versioning `_. +Please use the `documentation `_ for +the reference and usage examples. + +For your convenience follow `Semantic Versioning `_. Development diff --git a/docs/index.rst b/docs/index.rst index 40f35b5..1425cee 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,7 +6,6 @@ Contents :maxdepth: 2 readme - installation usage reference/index contributing diff --git a/docs/installation.rst b/docs/installation.rst deleted file mode 100644 index a6010a8..0000000 --- a/docs/installation.rst +++ /dev/null @@ -1,7 +0,0 @@ -============ -Installation -============ - -At the command line:: - - pip install mal-scraper diff --git a/docs/reference/index.rst b/docs/reference/index.rst index c6e0a63..c500fb0 100644 --- a/docs/reference/index.rst +++ b/docs/reference/index.rst @@ -1,11 +1,12 @@ Reference ========= -The public API is available directly by importing from `mal_scraper`:: +The public API is available directly by importing from `mal_scraper`, +for example:: import mal_scraper - mal_scraper.retrieve_anime # Core API + mal_scraper.get_anime # Core API mal_scraper.AiringStatus.ongoing # Constants/Enumerations mal_scraper.ParseError # Exceptions diff --git a/docs/reference/mal_scraper.rst b/docs/reference/mal_scraper.rst index c511546..f8bd278 100644 --- a/docs/reference/mal_scraper.rst +++ b/docs/reference/mal_scraper.rst @@ -1,7 +1,7 @@ Core API ======== -It currently supports retrieving Anime, User Profile/Stats, and User-Anime Info. +The library supports retrieving Anime, User Profile/Stats, and User-Anime Info. Anime and Users are identified by `id_ref`s which are integers for anime and strings for Users, so while you can enumerate through Anime, you must 'discover' @@ -15,4 +15,4 @@ Users. :members: :imported-members: :exclude-members: AgeRating, AiringStatus, ConsumptionStatus, Format, - ParseError + Season, ParseError diff --git a/docs/usage.rst b/docs/usage.rst index 12aea54..cdbae72 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -1,7 +1,32 @@ -===== -Usage -===== +============== +Usage/Examples +============== -To use MyAnimeList Scraper in a project:: +To use MyAnimeList Scraper in a project, for example to retrieve +anime metadata:: - import mal_scraper + import mal_scraper + import mycode + + next_id_ref = mycode.last_id_ref() + 1 + + try: + meta, data = mal_scraper.get_anime(next_id_ref) + except requests.exceptions.HTTPError as err: + code = err.response.status_code + if code == 404: + print('Anime #%d does not exist (404)', next_id_ref) + mycode.ignore_id_ref(next_id_ref) + else: + # Retry on network/server/request errors + print('Anime #%d HTTP error (%d)', next_id_ref, code) + mycode.mark_for_retry(next_id_ref) + else: + print('Adding Anime #%d', meta['id_ref']) + mycode.add_anime( + id_ref=meta['id_ref'], + anime_information_dated_at=meta['when'], + name=data['name'], + episodes=data['episodes'], + # Ignore other data + ) diff --git a/setup.cfg b/setup.cfg index 2c512b0..b71ed1b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -28,6 +28,7 @@ addopts = [isort] line_length=100 +multi_line_output=5 known_first_party=mal_scraper default_section=THIRDPARTY forced_separate=test_mal_scraper diff --git a/src/mal_scraper/__init__.py b/src/mal_scraper/__init__.py index 4a14c28..7a91554 100644 --- a/src/mal_scraper/__init__.py +++ b/src/mal_scraper/__init__.py @@ -1,7 +1,12 @@ __version__ = "0.2.1" # Import Public API -from .anime import retrieve_anime # noqa +from .anime import get_anime # noqa from .consts import AgeRating, AiringStatus, ConsumptionStatus, Format, Season # noqa from .exceptions import ParseError # noqa -from .users import discover_users, get_user_anime_list, get_user_stats # noqa +from .users import ( # noqa + discover_users, discover_users_from_html, get_user_anime_list, get_user_stats +) + +# Don't use this +FORCE_HTTP = False diff --git a/src/mal_scraper/anime.py b/src/mal_scraper/anime.py index ef9350e..960f591 100644 --- a/src/mal_scraper/anime.py +++ b/src/mal_scraper/anime.py @@ -1,3 +1,4 @@ +import itertools import logging from datetime import datetime @@ -8,7 +9,6 @@ from .exceptions import MissingTagError, ParseError from .mal_utils import get_date from .requester import request_passthrough - logger = logging.getLogger(__name__) # Future interface? @@ -17,8 +17,8 @@ logger = logging.getLogger(__name__) # pass -def retrieve_anime(id_ref=1, requester=request_passthrough): - """mal_scraper.retrieve_anime(id_ref=1, requester) +def get_anime(id_ref=1, requester=request_passthrough): + """mal_scraper.get_anime(id_ref=1, requester) Return the information for a particular show. @@ -35,16 +35,17 @@ def retrieve_anime(id_ref=1, requester=request_passthrough): `data`:: - { - 'name': str, - 'name_english': str, - 'format': mal_scraper.Format, - 'episodes': int, or None when MAL does not know, - 'airing_status': mal_scraper.AiringStatus, - 'airing_started': datetime, - 'airing_finished': datetime, or None when MAL does not know, - 'airing_premiere': tuple(Year (int), Season (mal_scraper.Season)), - } + { + 'name': str, + 'name_english': str, + 'format': mal_scraper.Format, + 'episodes': int, or None when MAL does not know, + 'airing_status': mal_scraper.AiringStatus, + 'airing_started': date, + 'airing_finished': date, or None when MAL does not know, + 'airing_premiere': tuple(Year (int), Season (mal_scraper.Season)) + or None (for films, OVAs, specials, ONAs and music), + } See also :class:`.Format`, :class:`.AiringStatus`, :class:`.Season`. @@ -60,17 +61,15 @@ def retrieve_anime(id_ref=1, requester=request_passthrough): next_anime = 1 try: - meta, data = mal_scraper.retrieve_anime(next_anime) + meta, data = mal_scraper.get_anime(next_anime) except mal_scraper.ParseError as err: logger.error('Investigate page %s with error %d', err.url, err.code) - except Network and Request Errors: - pass # TODO docs, retry etc. + except NetworkandRequestErrors: # Pseudo-code (TODO: These docs) + pass # Retry? else: mycode.save_data(data, when=meta['when']) next_anime = meta['id_ref'] + 1 - - .. py:sig:: mal_scrape.retrieve_anime(id_ref=1, requester) """ url = get_url_from_id_ref(id_ref) @@ -78,21 +77,25 @@ def retrieve_anime(id_ref=1, requester=request_passthrough): response.raise_for_status() # May raise soup = BeautifulSoup(response.content, 'html.parser') - data = retrieve_anime_from_soup(soup) # May raise + data = get_anime_from_soup(soup) # May raise meta = { 'when': datetime.utcnow(), 'id_ref': id_ref, + 'response': response, } return Retrieved(meta, data) def get_url_from_id_ref(id_ref): - return 'http://myanimelist.net/anime/{:d}'.format(id_ref) + # Use HTTPS to avoid auto-redirect from HTTP (except for tests) + from .__init__ import FORCE_HTTP + protocol = 'http' if FORCE_HTTP else 'https' + return '{}://myanimelist.net/anime/{:d}'.format(protocol, id_ref) -def retrieve_anime_from_soup(soup): +def get_anime_from_soup(soup): """Return the anime information from a soup of HTML. Args: @@ -105,32 +108,33 @@ def retrieve_anime_from_soup(soup): 'name': str, 'name_english': str, 'format': mal_scraper.Format, - 'episodes': int, - 'airing_status': TODO, - 'airing_started': TODO, - 'airing_finished': TODO, - 'airing_premiere': TODO, + 'episodes': int, or None when MAL does not know, + 'airing_status': mal_scraper.AiringStatus, + 'airing_started': date, + 'airing_finished': date, or None when MAL does not know, + 'airing_premiere': tuple(Year (int), Season (mal_scraper.Season)) + or None (for films, OVAs, specials, ONAs and music), } Raises: ParseError: If any component of the page could not be processed or was unexpected. """ - process = { - 'name': _get_name, - 'name_english': _get_english_name, - 'format': _get_format, - 'episodes': _get_episodes, - 'airing_status': _get_airing_status, - 'airing_started': _get_start_date, - 'airing_finished': _get_end_date, - 'airing_premiere': _get_airing_premiere, - } + process = [ + ('name', _get_name), + ('name_english', _get_english_name), + ('format', _get_format), + ('episodes', _get_episodes), + ('airing_status', _get_airing_status), + ('airing_started', _get_start_date), + ('airing_finished', _get_end_date), + ('airing_premiere', _get_airing_premiere), + ] data = {} - for tag, func in process.items(): + for tag, func in process: try: - result = func(soup) + result = func(soup, data) except ParseError as err: logger.debug('Failed to process tag %s', tag) err.specify_tag(tag) @@ -141,7 +145,7 @@ def retrieve_anime_from_soup(soup): return data -def _get_name(soup): +def _get_name(soup, data=None): tag = soup.find('span', itemprop='name') if not tag: raise MissingTagError('name') @@ -150,33 +154,38 @@ def _get_name(soup): return text -def _get_english_name(soup): +def _get_english_name(soup, data=None): pretag = soup.find('span', string='English:') + + # This is not always present (https://myanimelist.net/anime/15) if not pretag: - raise MissingTagError('english name') + return '' text = pretag.next_sibling.strip() return text -def _get_format(soup): +def _get_format(soup, data=None): pretag = soup.find('span', string='Type:') if not pretag: raise MissingTagError('type') - text = pretag.find_next('a').string.strip().upper() - format_ = { - 'TV': Format.tv - }.get(text, None) + for text in itertools.islice(pretag.next_siblings, 3): + text = text.string.strip() + if text: + break + else: + text = None + format_ = Format.mal_to_enum(text) if not format_: # pragma: no cover # Either we missed a format, or MAL changed the webpage - raise ParseError('type', 'Unknown format for the text "{}"'.format(text)) + raise ParseError('Unable to identify format from "{}"'.format(text)) return format_ -def _get_episodes(soup): +def _get_episodes(soup, data=None): pretag = soup.find('span', string='Episodes:') if not pretag: raise MissingTagError('episodes') @@ -189,12 +198,12 @@ def _get_episodes(soup): episodes_number = int(episodes_text) except (ValueError, TypeError): # pragma: no cover # MAL probably changed the webpage - raise ParseError('episodes', 'Unable to convert text "%s" to int' % episodes_text) + raise ParseError('Unable to convert text "%s" to int' % episodes_text) return episodes_number -def _get_airing_status(soup): +def _get_airing_status(soup, data=None): pretag = soup.find('span', string='Status:') if not pretag: raise MissingTagError('status') @@ -207,12 +216,12 @@ def _get_airing_status(soup): if not status: # pragma: no cover # MAL probably changed the website - raise ParseError('status', 'Unable to identify text "%s"' % status_text) + raise ParseError('Unable to identify status from "%s"' % status_text) return status -def _get_start_date(soup): +def _get_start_date(soup, data=None): pretag = soup.find('span', string='Aired:') if not pretag: raise MissingTagError('aired') @@ -224,18 +233,24 @@ def _get_start_date(soup): start_date = get_date(start_text) except ValueError: # pragma: no cover # MAL probably changed their website - raise ParseError('airing start date', 'Cannot process text "%s"' % start_text) + raise ParseError('Unable to identify date from "%s"' % start_text) return start_date -def _get_end_date(soup): +def _get_end_date(soup, data=None): pretag = soup.find('span', string='Aired:') if not pretag: raise MissingTagError('aired') aired_text = pretag.next_sibling.strip() - end_text = aired_text.split(' to ')[1] + date_range_text = aired_text.split(' to ') + + # Not all Aired tags have a date range (https://myanimelist.net/anime/5) + try: + end_text = date_range_text[1] + except IndexError: + return None if end_text == '?': return None @@ -244,27 +259,34 @@ def _get_end_date(soup): end_date = get_date(end_text) except ValueError: # pragma: no cover # MAL probably changed their website - raise ParseError('airing end date', 'Cannot process text "%s"' % end_text) + raise ParseError('Unable to identify date from "%s"' % end_text) return end_date -def _get_airing_premiere(soup): +def _get_airing_premiere(soup, data): pretag = soup.find('span', string='Premiered:') if not pretag: - raise MissingTagError('premiered') + # Film: https://myanimelist.net/anime/5 + # OVA: https://myanimelist.net/anime/44 + # ONA: https://myanimelist.net/anime/574 + # TODO: Missing Special, Music links + if data['format'] in (Format.film, Format.ova, Format.special, Format.ona, Format.music): + return None + else: + raise MissingTagError('premiered') season, year = pretag.find_next('a').string.lower().split(' ') season = Season.mal_to_enum(season) if season is None: # MAL probably changed their website - raise ParseError('premiered', 'Unable to identify season "%s"' % season) + raise ParseError('Unable to identify season from "%s"' % season) try: year = int(year) except (ValueError, TypeError): # pragma: no cover # MAL probably changed their website - raise ParseError('premiered', 'Unable to identify year "%s"' % year) + raise ParseError('Unable to identify year from "%s"' % year) return (year, season) diff --git a/src/mal_scraper/consts.py b/src/mal_scraper/consts.py index e9c54cf..d97c5fc 100644 --- a/src/mal_scraper/consts.py +++ b/src/mal_scraper/consts.py @@ -1,9 +1,8 @@ -"""All constants/enumerations available directly from `mal_scraper.x`""" +"""All constants/enumerations are available directly from `mal_scraper.x`""" from collections import namedtuple from enum import Enum, unique - Retrieved = namedtuple('Retrieved', ['meta', 'data']) """When successfully retrieving from a web-page @@ -50,7 +49,7 @@ class Season(Enum): @classmethod def mal_to_enum(cls, text): - """Return the enum from the MAL string, or None""" + """Return the enum from the MAL string, or None.""" return { 'winter': cls.winter, 'spring': cls.spring, @@ -59,10 +58,26 @@ class Season(Enum): }.get(text.lower().strip()) -@unique class Format(Enum): """The media format of a media item.""" tv = 'TV' + film = movie = 'FILM' # https://myanimelist.net/anime/5 + ova = 'OVA' # https://myanimelist.net/anime/44 + special = 'SPECIAL' + ona = 'ONA' # (Original Net Animation) https://myanimelist.net/anime/574 + music = 'MUSIC' # Seriously? https://myanimelist.net/anime/731 + + @classmethod + def mal_to_enum(cls, text): + """Return the enum from the MAL string, or None.""" + return { + 'tv': cls.tv, + 'movie': cls.film, + 'ova': cls.ova, + 'special': cls.special, + 'ona': cls.ona, + 'music': cls.music, + }.get(text.lower().strip()) @unique diff --git a/src/mal_scraper/exceptions.py b/src/mal_scraper/exceptions.py index 4787ef9..a7dffc2 100644 --- a/src/mal_scraper/exceptions.py +++ b/src/mal_scraper/exceptions.py @@ -1,10 +1,12 @@ +"""All exceptions are available directly from `mal_scraper.x`""" + import logging logger = logging.getLogger(__name__) class MalScraperError(Exception): - """All exceptions raised by this library.""" + """Parent to all exceptions raised by this library.""" class ParseError(MalScraperError): @@ -36,10 +38,10 @@ class ParseError(MalScraperError): class MissingTagError(ParseError): - """The tag is missing from the soup/webpage. + """The tag is missing from the soup/web-page. - Internal exception to mal_scraper. + This is internal, so you should instead catch :class:`.ParseError`. """ def __init__(self, tag=None): - super().__init__('Missing from soup/webpage', tag) + super().__init__('Missing from soup/web-page', tag) diff --git a/src/mal_scraper/mal_utils.py b/src/mal_scraper/mal_utils.py index afa54e7..caecbf2 100644 --- a/src/mal_scraper/mal_utils.py +++ b/src/mal_scraper/mal_utils.py @@ -3,7 +3,6 @@ import re from datetime import datetime, timedelta - last_online_minutes = re.compile(r'(?P\d+) minutes? ago') last_online_hours = re.compile(r'(?P\d+) hours? ago') @@ -15,7 +14,7 @@ def get_datetime(text, relative_to=None): in case the timestamp was generated at a different time. Args: - text (str): The following examples are supported + text (str): The following examples are supported (with varying accuracy) Oct 1, 2013 11:04 PM Oct 1, 4:29 AM Yesterday, 9:58 AM @@ -25,9 +24,11 @@ def get_datetime(text, relative_to=None): 1 minute ago Now - Returns datetime.datetime + Returns: + datetime.datetime - Raises ValueError if the conversion fails + Raises: + ValueError if the conversion fails Issues: - Potentially locale-dependent. @@ -72,16 +73,36 @@ def get_datetime(text, relative_to=None): def get_date(text): - """Convert a date like "Apr 3, 1998" + """Return a datetime from a date like "Apr 3, 1998", or None. Args: - text (str): like "Apr 3, 1998" + text (str): The following examples are supported + Apr 3, 1998 + Apr, 1994 (This will convert to 1st Apr 1994 as a best guess; + https://myanimelist.net/anime/730) + 2003 (This will convert to 1st Jan 2003 as a best guess; + https://myanimelist.net/anime/1190) - Returns datetime.date + Returns: + datetime.date - Raises ValueError if the conversion fails + Raises: + ValueError if the conversion fails Issues: - - This may be locale dependent + This may be locale dependent """ - return datetime.strptime(text, '%b %d, %Y').date() + try: + return datetime.strptime(text, '%b %d, %Y').date() + except ValueError: + pass + + try: + return datetime.strptime(text, '%b, %Y').date() + except ValueError: + pass + + try: + return datetime.strptime(text, '%Y').date() + except ValueError: + pass diff --git a/src/mal_scraper/users.py b/src/mal_scraper/users.py index 039c505..6f88c8b 100644 --- a/src/mal_scraper/users.py +++ b/src/mal_scraper/users.py @@ -50,6 +50,31 @@ def discover_users(requester=request_passthrough): return users +# TODO: Clean this up +username_regex = re.compile( + r"href=[\"'](https?\://myanimelist\.net)?/profile/(?P\w+)[\w/]*[\"']", + re.ASCII | re.DOTALL | re.IGNORECASE, +) + + +def discover_users_from_html(html): + """Generate usernames from the given HTML (repetition is possible) + + Args: + html (str): HTML to hunt through + + Yields: + Usernames (string) + + Test strings:: + + + + All reviews + """ + return (m.group('username') for m in username_regex.finditer(html)) + + def get_user_stats(username, requester=request_passthrough): """Return statistics about a particular user. @@ -108,7 +133,7 @@ def get_user_anime_list(username, requester=request_passthrough): { name: (string) name of the anime - id_ref: (id_ref) can be used with retrieve_anime, + id_ref: (id_ref) can be used with get_anime, consumption_status: (ConsumptionStatus), is_rewatch: (bool), score: (int) 0-10, @@ -145,7 +170,10 @@ def get_user_anime_list(username, requester=request_passthrough): def get_profile_url_from_username(username): - return 'http://myanimelist.net/profile/{:s}'.format(username) + # Use HTTPS to avoid auto-redirect from HTTP (except for tests) + from .__init__ import FORCE_HTTP + protocol = 'http' if FORCE_HTTP else 'https' + return '{}://myanimelist.net/profile/{:s}'.format(protocol, username) def get_anime_list_url_for_user(username, offset=0): @@ -157,8 +185,10 @@ def get_anime_list_url_for_user(username, offset=0): Returns: String url """ - url = 'http://myanimelist.net/animelist/{username}/load.json?offset={offset:d}&status=7' - return url.format(username=username, offset=offset) + from .__init__ import FORCE_HTTP + protocol = 'http' if FORCE_HTTP else 'https' + url = '{protocol}://myanimelist.net/animelist/{username}/load.json?offset={offset:d}&status=7' + return url.format(protocol=protocol, username=username, offset=offset) # --- Dynamic User Discovery --- diff --git a/tests/mal_scraper/auto_responses/Z2V0Ois6aHR0cDovL215YW5pbWVsaXN0Lm5ldC9hbmltZS80NA== b/tests/mal_scraper/auto_responses/Z2V0Ois6aHR0cDovL215YW5pbWVsaXN0Lm5ldC9hbmltZS80NA== new file mode 100644 index 0000000..01ec310 --- /dev/null +++ b/tests/mal_scraper/auto_responses/Z2V0Ois6aHR0cDovL215YW5pbWVsaXN0Lm5ldC9hbmltZS80NA== @@ -0,0 +1,1356 @@ + + + + + + + + +Rurouni Kenshin: Meiji Kenkaku Romantan - Tsuioku-hen - MyAnimeList.net + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ +
+
+ + +
+ +
+
+
+ Edit Anime Information +
+
+ +
What would you like to edit?
+ +   +
+
+

Rurouni Kenshin: Meiji Kenkaku Romantan - Tsuioku-hen

+ + + + + +
+ +
+ + Rurouni Kenshin: Meiji Kenkaku Romantan - Tsuioku-hen + +
+ + + + + + + + + +

+ +

Alternative Titles

+ English: Samurai X: Trust and Betrayal +
+ Synonyms: Rurouni Kenshin: Tsuiokuhen, Rurouni Kenshin: Reminiscence +
+ Japanese: るろうに剣心―明治剣客浪漫譚―追憶編 +

+ +

Information

+ +
+ Type: + OVA
+ +
+ Episodes: + 4 +
+ +
+ Status: + Finished Airing +
+ +
+ Aired: + Feb 20, 1999 to Sep 22, 1999 +
+ + +
+ Producers: + Aniplex
+
+ Licensors: + ADV Films, Aniplex of America
+
+ Studios: + Studio Deen
+ +
+ Source: + Manga +
+ + + +
+ Duration: + 30 min. per ep. +
+ +
+ Rating: + R - 17+ (violence & profanity) +
+ +
+ +

Statistics

+
+ Score: + 8.821 (scored by 77,216 users) + + +
+ 1 + indicates a weighted score. Please note that 'Not yet aired' titles are excluded. + +
+
+
+ Ranked: + #252 +
+ 2 + based on the top anime page. Please note that 'Not yet aired' and 'R18+' titles are excluded. + +
+
+
+ Popularity: + #428 +
+
+ Members: + 139,484 +
+
+ Favorites: + 4,051 +
+ + +
+ +
+
+ +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ 8.82 +
Ranked #25Popularity #428Members 139,484
Add to List
+ Episodes: /4
buy from amazon
+

Synopsis

When mankind's savagery surpasses his fear of death, there is little hope for those who wish to live honest lives. Beneath a full moon, a young boy witnesses the murder of the bandits who had enslaved him, and is then christened with a new name by the man who rescued him. This boy is Shinta, now known as Kenshin Himura, and he is destined to become a swordsman. The softness of his heart does not befit the occupation, but his desire to protect the innocent is absolute.
+
+Rurouni Kenshin: Meiji Kenkaku Romantan - Tsuioku-hen details the origins of the man who would bear the name of Hitokiri Battousai long before he swore his oath not to kill and before he earned his reputation as an assassin. The young man’s heart is divided between justice and corruption, while the fate of a nation rests on his actions.
+
+[Written by MAL Rewrite]

Background

No background information has been added to this title. Help improve our database by adding background information here.
+
+
+ +
+
+
+
+ +
+

Related Anime


Characters & Voice Actors

+ + + + + +
+
Himura, Kenshin
+
+ Himura, Kenshin +
Main
+
+ + + + + + + + + +
+ Suzukaze, Mayo
+ Japanese +
Suzukaze, Mayo
+
+ Suzuki, Masami
+ Japanese +
Suzuki, Masami
+
...
+
+ + + + + +
+
Yukishiro, Tomoe
+
+ Yukishiro, Tomoe +
Main
+
+ + + + + +
+ Iwao, Junko
+ Japanese +
Iwao, Junko
+
+
+ + + + + +
+
Saitou, Hajime
+
+ Saitou, Hajime +
Supporting
+
+ + + + + +
+ Suzuoki, Hirotaka
+ Japanese +
Suzuoki, Hirotaka
+
+
+ + + + + +
+
Shishio, Makoto
+
+ Shishio, Makoto +
Supporting
+
  +

Staff

+ + + + + + + + + + + + + + + + + + + +
Campbell, Charles
Campbell, Charles +
Producer, ADR Director, Recording Engineer
Furuhashi, Kazuhiro
Furuhashi, Kazuhiro +
Director
Hata, Shouji
Hata, Shouji +
Sound Director
Matsumoto, Atsushi
Matsumoto, Atsushi +
Storyboard


+
+

+ Edit + Opening Theme +

+
"In Dreams" by Taku Iwasaki
+
+
+ +
+

+ Edit + Ending Theme +

+
"Quiet Life" by Taku Iwasaki
+
+
+

+
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+
+


More reviewsReviews

+ +
+
+
+ Aug 13, 2008 + +
+ Overall Rating: + 10 +
+
+ + + + + +
+
+ + + +
+
+ TheCriticsClub + (All reviews)
+ +
+
+
+
+ + + + There's a universally accepted truth as far as anime shounen stories go: nine times out of ten, the manga is better than the anime adaptation. While that is the case with Rurouni Kenshin as a whole, what Studio DEEN did with Rurouni Kenshin: Tsuiokuhen can be called nothing short of a masterpiece. In the manga, Nobuhiro Watsuki describes Kenshin's past that's full of strife and hardship, but with a touch of comedy to help tone down the entire seriousness of the situation. Studio DEEN abolished what little comedy Watsuki went with and, along with flawless animation, a unique art style, and a beautifully composed soundtrack + + + read more +
+
+ +
+
+ + +
+
+
+ Jul 7, 2007 + +
+ Overall Rating: + 10 +
+
+ + + + + +
+
+ + + +
+
+ mistress_reebi + (All reviews)
+ +
+
+
+
+ + + + Also named: "Samurai X: Trust and Betrayal", this is a prequel to the anime series 'Rurouni Kenshin."
+
+One word for this anime: Amazing! It's so good that it's hard to decribe. This is one of the only anime series that will make the viewer's jaw drop to the floor and be filled with emotion. Those who are Rurouni Kenshin fans will love it; those who are new to the series will still like it. It's a drama and may not be as interesting among younger viewers and is more mature than the anime. Those who are sensitive to extreme violence and blood may want to turn + + + read more +
+
+ +
+
+ + +
+
+
+ May 29, 2013 + +
+ Overall Rating: + 10 +
+
+ + + + + +
+
+ + + +
+
+ Tatterdemalion + (All reviews)
+ +
+
+
+
+ + + + Surprising though it may be, it’s really incredibly rare to find a samurai anime that is actually good. As far as the samurai genre goes, Akira Kurosawa pretty much closed the book with 1954’s “Seven Samurai” and since then, is seems as if whenever anyone attempts to tackle the genre, there exists a mysterious force that compels them to strip away any and all sense of authenticity and add in superpowers, vampires, aliens, or hip-hop (not that that is necessarily a bad thing but it certainly gets tiresome). That’s one of the reasons why Rurouni Kenshin: Tsuiokuhen is so refreshing, it daringly tackles the story + + + read more +
+
+ +
+
+ + +
+
+
+ Dec 1, 2015 + +
+ Overall Rating: + 10 +
+
+ + + + + +
+
+ + + +
+
+ Nervin + (All reviews)
+ +
+
+
+
+ + + + Throughout the past decades, japanese history and culture is often portrayed in various mediums, in particular that of movies which often take place in the last two centuries of Japan's history. This era is characterised by a slow shift from feudal traditions to the modernization brought from the west, being the transition from the Edo period to the Meiji period, also known as the japanese revolution in 1868, of importance in this case. Rurouni Kenshin: Meiji Kenkaku Romantan - Tsuiokuhen narrates the tale of Himura Kenshin's past and his struggle with his own beliefs against the harsh reality he faced. It is truly a masterpiece, + + + read more +
+
+ +
+
+
+ + +
+
+ + +
+
+
+ + +
+

+ + Recommendations +


Recent News


Recent Forum Discussion

+ + + + + + + + + + + + +
Spoiler Alert! Did Kenshin join the Shinsengumi?
TinkerAsune - Dec 28, 2015
1 repliesby saberlove123 »»
5 hours ago
Who did Tomoe want to forgive her in the end?
xsilicon9 - Nov 30, 2013
2 repliesby saberlove123 »»
Apr 30, 11:34 PM

Recent Featured Articles

+ +
+ Top 15 Most Beautiful Anime Eyes of All Time +
+

+ Top 15 Most Beautiful Anime Eyes of All Time +

+
+ One of the most recognizable traits of any anime is obvious - the unique anime eyes. With the wide array of beautiful examples available, its is practically impossible to narrow it down. And yet, we've done it! See if your favorites made the cut in this collection of 15 beautiful anime eyes! +
+
+

+ by MoxieWriter001 +

+ 56,809 views +

+
+
+
+
+
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ + + + +
+ + + +
+ + +
+ +
+
+ + + + + + + + + + diff --git a/tests/mal_scraper/auto_responses/Z2V0Ois6aHR0cDovL215YW5pbWVsaXN0Lm5ldC9hbmltZS81 b/tests/mal_scraper/auto_responses/Z2V0Ois6aHR0cDovL215YW5pbWVsaXN0Lm5ldC9hbmltZS81 new file mode 100644 index 0000000..af82a57 --- /dev/null +++ b/tests/mal_scraper/auto_responses/Z2V0Ois6aHR0cDovL215YW5pbWVsaXN0Lm5ldC9hbmltZS81 @@ -0,0 +1,1327 @@ + + + + + + + + +Cowboy Bebop: Tengoku no Tobira (Cowboy Bebop: The Movie) - MyAnimeList.net + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ +
+
+ + +
+ +
+
+
+ Edit Anime Information +
+
+ +
What would you like to edit?
+ +   +
+
+

Cowboy Bebop: Tengoku no Tobira

+ + + + + +
+ +
+ + Cowboy Bebop: Tengoku no Tobira + +
+ + + + + + + + + +

+ +

Alternative Titles

+ English: Cowboy Bebop: The Movie +
+ Synonyms: Cowboy Bebop: Knockin' on Heaven's Door +
+ Japanese: カウボーイビバップ天国の扉 +

+ +

Information

+ +
+ Type: + Movie
+ +
+ Episodes: + 1 +
+ +
+ Status: + Finished Airing +
+ +
+ Aired: + Sep 1, 2001 +
+ + +
+ Producers: + Sunrise, Bandai Visual
+ +
+ Studios: + Bones
+ +
+ Source: + Original +
+ +
+ Genres: + Action, Space, Drama, Mystery, Sci-Fi
+ +
+ Duration: + 1 hr. 54 min. +
+ +
+ Rating: + R - 17+ (violence & profanity) +
+ +
+ +

Statistics

+
+ Score: + 8.401 (scored by 94,825 users) + + +
+ 1 + indicates a weighted score. Please note that 'Not yet aired' titles are excluded. + +
+
+
+ Ranked: + #1502 +
+ 2 + based on the top anime page. Please note that 'Not yet aired' and 'R18+' titles are excluded. + +
+
+
+ Popularity: + #394 +
+
+ Members: + 147,979 +
+
+ Favorites: + 592 +
+ + +
+ +
+
+ +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ 8.40 +
Ranked #150Popularity #394Members 147,979
Add to List
+ Episodes: /1
buy from amazon
+

Synopsis

Another day, another bounty—such is the life of the often unlucky crew of the Bebop. However, this routine is interrupted when Faye, who is chasing a fairly worthless target on Mars, witnesses an oil tanker suddenly explode, causing mass hysteria. As casualties mount due to a strange disease spreading through the smoke from the blast, a whopping three hundred million woolong price is placed on the head of the supposed perpetrator.
+
+With lives at stake and a solution to their money problems in sight, the Bebop crew springs into action. Spike, Jet, Faye, and Edward, followed closely by Ein, split up to pursue different leads across Alba City. Through their individual investigations, they discover a cover-up scheme involving a pharmaceutical company, revealing a plot that reaches much further than the ragtag team of bounty hunters could have realized.
+
+[Written by MAL Rewrite]

Background

No background information has been added to this title. Help improve our database by adding background information here.
+
+
+ +
+
+
+
+ +
+

Related Anime


Characters & Voice Actors

+ + + + + +
+
Spiegel, Spike
+
+ Spiegel, Spike +
Main
+
+ + + + + +
+ Yamadera, Kouichi
+ Japanese +
Yamadera, Kouichi
+
+
+ + + + + +
+
Wong Hau Pepelu Tivrusky IV, Edward
+
+ Wong Hau Pepelu Tivrusky IV, Edward +
Main
+
+ + + + + +
+ Tada, Aoi
+ Japanese +
Tada, Aoi
+
+
+ + + + + +
+
Valentine, Faye
+
+ Valentine, Faye +
Main
+
+ + + + + +
+ Hayashibara, Megumi
+ Japanese +
Hayashibara, Megumi
+
+
+ + + + + +
+
Black, Jet
+
+ Black, Jet +
Main
+
+ + + + + +
+ Ishizuka, Unshou
+ Japanese +
Ishizuka, Unshou
+
+

Staff

+ + + + + + + + + + + + + + + + + + + +
Minami, Masahiko
Minami, Masahiko +
Producer
Maseba, Yutaka
Maseba, Yutaka +
Producer
Ueda, Masuo
Ueda, Masuo +
Producer
Watanabe, Shinichiro
Watanabe, Shinichiro +
Director, Storyboard


+
+

+ Edit + Opening Theme +

+
"Ask DNA" by The Seatbelts featuring Raju Ramayya
+
+
+ +
+

+ Edit + Ending Theme +

+
"Gotta Knock a Little Harder" by The Seatbelts featuring Mai Yamane
+
+
+

+
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+
+


More reviewsReviews

+ +
+
+
+ Nov 10, 2008 + +
+ Overall Rating: + 8 +
+
+ + + + + +
+
+ + + +
+
+ TheLlama + (All reviews)
+ +
+
+
+
+ + + + Cowboy Bebop: Knockin' on Heaven's Door is a great addition to the Cowboy Bebop series, but no more. It is by no means a sequel, and after watching it, I found that it's best watched in the middle of the series, and not neccesarily at the end. If it's got a specific place or not, that I don't know, but that's not very important at any rate, and if you've watched the entire series, it shouldn't be hard to mentally place it inside the series anyway.
+
+This time, a terrorist possesses a weapon capable of killing countless people, and there's a bounty of 300 million + + + read more +
+
+ +
+
+ + +
+
+
+ Jun 24, 2008 + +
+ Overall Rating: + 9 +
+
+ + + + + +
+
+ + + +
+
+ Venneh + (All reviews)
+ +
+
+
+
+ + + + Cowboy Bebop: Knockin' on Heaven's Door was released in Japan on September 1st, 2001. Shinichiro Watanabe stayed on as director, and it was produced this time by not only Sunrise, but also Bandai Visual (famous for their work on the .hack series and Dennou Coil), and Bones (famous for their work on Fullmetal Alchemist and Ouran High School Host Club). It was released Stateside by Bandai on August 11th, 2002.
+
+It's just a few days before Halloween on Ganymede, a major national holiday, and a terrorist has blown up a tanker filled with a biochemical weapon. The government posts a 300 million Wulong + + + read more +
+
+ +
+
+ + +
+
+
+ Aug 31, 2007 + +
+ Overall Rating: + 8 +
+
+ + + + + +
+
+ + + +
+
+ jet2r0cks + (All reviews)
+ +
+
+
+
+ + + + It was a good follow up (in-between, actually) to the series. I suggest that if you’re planning to watch Cowboy Bebop – Knockin’ on Heaven’s Door, you should watch after you get to the episode when Ed is introduced. You just need to get to know all 4 major characters to understand the movie.
+
+I didn’t like it as much as the series, mostly because the series kept me interested by introducing new plot lines in each episode. Having to focus on one specific plot for 120 minutes was a bit exhausting. It has a nice plot – throughout the movie you’ll get why “Knockin’ on + + + read more +
+
+ +
+
+ + +
+
+
+ Nov 22, 2007 + +
+ Overall Rating: + 5 +
+
+ + + + + +
+
+ + + +
+
+ YourMessageHere + (All reviews)
+ +
+
+
+
+ + + + I'm never that comfortable with films of series. Mostly, that's because all too often a film of a series consists of some kind of edited-all-to-hell clip show that tries and totally fails to boil down the story of a long series to a relatively much shorter film. Knockin' on Heaven's Door isn't that, which is very much in its favour. Rather, it's basically like a two-hour "lost episode" that belongs somewhere in the middle of the series - without spoiling anything, by the end of the series, there's characters missing who are still present in this film.
+
+Another point in the film's favour + + + read more +
+
+ +
+
+
+ + +
+
+ + +
+
+
+ + +
+

+ + Recommendations +


Recent News

Keanu Reeves to play Spike Spiegel [Updated on January 15]

Keanu Reeves to play Spike Spiegel [Updated on January 15]

+

Keanu Reeves has confirmed that he is indeed involved in the live-action adaptation of Cowboy Bebop. Reeves recently spoke with MTV and confirmed his involvement. Re...read more

+
+

Recent Forum Discussion

+ + + + + + + + + + + + +
Poll: Cowboy Bebop - Knockin' on Heaven's Door Episode 1 Discussion ( 1 2 )
aero - Aug 7, 2008
80 repliesby Blackouting »»
Apr 26, 9:19 PM
This actually takes place AFTER the series
Blackouting - Dec 23, 2014
7 repliesby LancimusPrime »»
Jan 31, 2016 9:11 PM

Recent Featured Articles

+ +
+ 20 of the Best Mature Anime of All Time +
+

+ 20 of the Best Mature Anime of All Time +

+
+ Anime aimed at teens is a lot of fun. But anime aimed at an older crowd is on a whole other level! You get more violence, gore, nudity and sex than you bargained for...which isn't entirely a bad thing. +
+ +
+
+ +
+ Top Anime at the Box Office That's Not Ghibli or a Damn Toy Commercial +
+

+ Top Anime at the Box Office That's Not Ghibli or a Damn Toy Commercial +

+
+ Look at the top ten most successful anime at the American box office and its... almost all Pokemon, other toy/card game show adaptations, and Studio Ghibli films. But what other anime films have managed to make money in their limited releases? +
+
+

+ by hoyvinglavin64 +

+ 13,453 views +

+
+
+
+
+
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ + + + +
+ + + +
+ + +
+ +
+
+ + + + + + + + + + diff --git a/tests/mal_scraper/auto_responses/Z2V0Ois6aHR0cDovL215YW5pbWVsaXN0Lm5ldC9hbmltZS81NzQ= b/tests/mal_scraper/auto_responses/Z2V0Ois6aHR0cDovL215YW5pbWVsaXN0Lm5ldC9hbmltZS81NzQ= new file mode 100644 index 0000000..e19abdb --- /dev/null +++ b/tests/mal_scraper/auto_responses/Z2V0Ois6aHR0cDovL215YW5pbWVsaXN0Lm5ldC9hbmltZS81NzQ= @@ -0,0 +1,1015 @@ + + + + + + + + +Rean no Tsubasa (The Wings of Rean) - MyAnimeList.net + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ +
+
+ + +
+ +
+
+
+ Edit Anime Information +
+
+ +
What would you like to edit?
+ +   +
+
+

Rean no Tsubasa

+ + + + + +
+ +
+ + Rean no Tsubasa + +
+ + + + + + + + + +

+ +

Alternative Titles

+ English: The Wings of Rean +
+ Japanese: リーンの翼 +

+ +

Information

+ +
+ Type: + ONA
+ +
+ Episodes: + 6 +
+ +
+ Status: + Finished Airing +
+ +
+ Aired: + Dec 16, 2005 to Aug 18, 2006 +
+ + + + +
+ Studios: + Sunrise
+ +
+ Source: + Novel +
+ +
+ Genres: + Fantasy, Mecha, Sci-Fi
+ +
+ Duration: + 24 min. per ep. +
+ +
+ Rating: + PG-13 - Teens 13 or older +
+ +
+ +

Statistics

+
+ Score: + 5.871 (scored by 748 users) + + +
+ 1 + indicates a weighted score. Please note that 'Not yet aired' titles are excluded. + +
+
+
+ Ranked: + #70942 +
+ 2 + based on the top anime page. Please note that 'Not yet aired' and 'R18+' titles are excluded. + +
+
+
+ Popularity: + #5679 +
+
+ Members: + 2,307 +
+
+ Favorites: + 0 +
+ + +
+ +
+
+ +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ 5.87 +
Ranked #7094Popularity #5679Members 2,307
Add to List
+ Episodes: /6
buy from amazon
+

Synopsis

Because his friends fired a rocket into the US Army camp, Suzuki was wanted by the US Army and the police. While he was running away the sea surface suddenly rose, and when a brilliant light appeared he saw a strange looking battleship flying in the air. He was dumped into the sea and when he crawled onto the battleship there was a beautiful girl standing there. She said her name was Lyx, the princess of another world, and added, "My Father is Japanese, Shinjiro Sakomizu. Please help me, Suzuki."
+
+Based on the novel series by the Gundam creator Yoshiyuki Tomino.
+
+(Source: AnimeNfo)

Background

No background information has been added to this title. Help improve our database by adding background information here.
+
+
+ +
+
+
+
+ +
+

Related Anime


Characters & Voice Actors

+ + + + + +
+
Sakomizu, Luxe
+
+ Sakomizu, Luxe +
Main
+
+ + + + + +
+ Shimamura, Yuu
+ Japanese +
Shimamura, Yuu
+
+
+ + + + + +
+
Suzuki, Asap
+
+ Suzuki, Asap +
Main
+
+ + + + + +
+ Fukuyama, Jun
+ Japanese +
Fukuyama, Jun
+
+
+ + + + + +
+
Sakomizu, Shinjirou
+
+ Sakomizu, Shinjirou +
Supporting
+
+ + + + + +
+ Koyama, Rikiya
+ Japanese +
Koyama, Rikiya
+
+

Staff

+ + + + + + + + + + + + + + + + + + + +
Tomino, Yoshiyuki
Tomino, Yoshiyuki +
Director, Script, Storyboard, Original Creator
Wakabayashi, Kazuhiro
Wakabayashi, Kazuhiro +
Sound Director
Tsuchiya, Anna
Tsuchiya, Anna +
Theme Song Performance
Mitsunaka, Susumu
Mitsunaka, Susumu +
Key Animation


+
+

+ Edit + Opening Theme +

+
+ No opening themes have been added to this title. Help improve our database by adding an opening theme here. +
+
+
+ +
+

+ Edit + Ending Theme +

+
"MY FATE" by ANNA
+
+
+

+
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+
+


More reviewsReviews

+ +
+
+
+ Apr 27, 2008 + +
+ Overall Rating: + 5 +
+
+ + + + + +
+
+ + + +
+
+ orion28 + (All reviews)
+ +
+
+
+
+ + + + Wings of Rean is a 6 episode series , subtitled in english. It's very wordy the 1st 4 episodes so you have trouble watching the anime itself. The plot is explained briefly and it's hard to have a sense of whats going on in the show. the saving grace is the fight scenes during the last 2 episodes of the series which are less wordy and have alot of action in them. + + +
+ Helpful +
+
+
+ +
+
+ + +
+
+
+ Sep 20, 2010 + +
+ Overall Rating: + 6 +
+
+ + + + + +
+
+ + + +
+
+ jagerzero + (All reviews)
+ +
+
+
+
+ + + + For the first 5.95 episodes I thought this anime was very good. Good art, music, plot and characters. A bit of action, adventure and throw in a bit of romance. Always a good mix. The mecha involved are especially inventive, who ever though to use giant bugs? not exactly gundam material but it will have to do. Anyway it always comes down to an ending, and this one did not have an ending I cared for. I am currently searching for the manga adaptation in a hopeful plea that the animes ending was wrong. + + +
+ Helpful +
+
+
+ +
+
+
+ + +
+
+ + +
+
+
+ + +
+

Recommendations


Recent News


Recent Forum Discussion

+ + + + + + +
Poll: Rean no Tsubasa Episode 6 Discussion
AleksVin - May 22, 2016
0 repliesby AleksVin »»
May 22, 2016 8:47 AM
+
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ + + + +
+ + + +
+ + +
+ +
+
+ + + + + + + + + + diff --git a/tests/mal_scraper/auto_responses/Z2V0Ois6aHR0cDovL215YW5pbWVsaXN0Lm5ldC9hbmltZS83MzA= b/tests/mal_scraper/auto_responses/Z2V0Ois6aHR0cDovL215YW5pbWVsaXN0Lm5ldC9hbmltZS83MzA= new file mode 100644 index 0000000..ca377e8 --- /dev/null +++ b/tests/mal_scraper/auto_responses/Z2V0Ois6aHR0cDovL215YW5pbWVsaXN0Lm5ldC9hbmltZS83MzA= @@ -0,0 +1,1180 @@ + + + + + + + + +Houkago no Shokuinshitsu (After School in the Lounge) - MyAnimeList.net + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ +
+
+ + +
+ +
+
+
+ Edit Anime Information +
+
+ +
What would you like to edit?
+ +   +
+
+

Houkago no Shokuinshitsu

+ + + + + +
+ +
+ + Houkago no Shokuinshitsu + +
+ + + + + + + + + +

+ +

Alternative Titles

+ English: After School in the Lounge +
+ Synonyms: After School in the Teacher's Lounge +
+ Japanese: 放課後の職員室 +

+ +

Information

+ +
+ Type: + OVA
+ +
+ Episodes: + 2 +
+ +
+ Status: + Finished Airing +
+ +
+ Aired: + Apr, 1994 to Jan 27, 1995 +
+ + +
+ Producers: + Daiei, SIDO LIMITED
+
+ Licensors: + None found, add some
+
+ Studios: + None found, add some
+ +
+ Source: + Manga +
+ +
+ Genres: + Drama, Romance, Yaoi
+ +
+ Duration: + 28 min. per ep. +
+ +
+ Rating: + R+ - Mild Nudity +
+ +
+ +

Statistics

+
+ Score: + 5.211 (scored by 2,438 users) + + +
+ 1 + indicates a weighted score. Please note that 'Not yet aired' titles are excluded. + +
+
+
+ Ranked: + N/A2 +
+ 2 + based on the top anime page. Please note that 'Not yet aired' and 'R18+' titles are excluded. + +
+
+
+ Popularity: + #4301 +
+
+ Members: + 4,781 +
+
+ Favorites: + 4 +
+ + +
+ +
+
+ +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ 5.21 +
Ranked N/APopularity #4301Members 4,781
Add to List
+ Episodes: /2
buy from amazon
+

Synopsis

Two teachers and their ups and downs of being in love with each other.

Background

No background information has been added to this title. Help improve our database by adding background information here.
+
+
+ +
+
+
+
+ +
+

Related Anime


Characters & Voice Actors

+ + + + + +
+
Toshiaki, Kazama
+
+ Toshiaki, Kazama +
Main
+
+ + + + + +
+ Yanada, Kiyoyuki
+ Japanese +
Yanada, Kiyoyuki
+
+
+ + + + + +
+
Mitsuro, Kawase
+
+ Mitsuro, Kawase +
Main
+
+ + + + + +
+ Midorikawa, Hikaru
+ Japanese +
Midorikawa, Hikaru
+
+

Staff

+ + + + + + + + + + + + + + + + + + + +
Fukuda, Masaru
Fukuda, Masaru +
Producer
Hirose, Kazuyoshi
Hirose, Kazuyoshi +
Director, Storyboard, Editing
Koide, Mieko
Koide, Mieko +
Original Creator
Kimura, Shinji
Kimura, Shinji +
Art Director


+
+

+ Edit + Opening Theme +

+
+ No opening themes have been added to this title. Help improve our database by adding an opening theme here. +
+
+
+ +
+

+ Edit + Ending Theme +

+
"Out of a Delusion" by Satou Mitsuru
+
+
+

+
+
+ +
+
+
+
+ +
+

More reviewsReviews

+ +
+
+
+ Jun 18, 2009 + +
+ Overall Rating: + 2 +
+
+ + + + + +
+
+ + + +
+
+ yaoisnotgay + (All reviews)
+ +
+
+
+
+ + + + Wow. I tried watching this anime, and couldn't finish episode one. The plot horrible. Imagine an 80's porno in slow motion. Beyond that, the art was horrible.
+
+I absolutely do not recommend wasting your time on this. + + +
+ Helpful +
+
+
+ +
+
+ + +
+
+
+ May 3, 2015 + +
+ Overall Rating: + 10 +
+
+ + + + + +
+
+ + + +
+
+ rennygade + (All reviews)
+ +
+
+
+
+ + + + Truly this is an outstanding slice of entertainment.
+Animation at it's best.
+10/10.
+This is quality.
+Fun for the whole family.
+Worth 54 minutes of my life. + + +
+ Helpful +
+
+
+ +
+
+ + +
+
+
+ Sep 8, 2010 + +
+ Overall Rating: + 2 +
+
+ + + + + +
+
+ + + +
+
+ Diamond_Dust + (All reviews)
+ +
+
+
+
+ + + + Wow. It took me a grand total of three minutes to hate this show. I’m not exaggerating in the least. I had to practically pull my hair out in order to force myself to watch all of it. The seme is a stalker, the uke is an idiot, the plot is horrible, and everything is delightfully cliché (please note the sarcasm).
+
+The music sounds like something off of a porno. The art is bland, and the characters look like blocks. Even the fan service sucks, if you can call it that...There is nothing sexy about it at all. Nothing. Don't believe me? Watch the first five + + + read more +
+
+ +
+
+ + +
+
+
+ Apr 18, 2013 + +
+ Overall Rating: + 3 +
+
+ + + + + +
+
+ + + +
+
+ Parasprite + (All reviews)
+ +
+
+
+
+ + + + Are you looking for one of the worst anime series ever created? Well add this to your list of contenders because Houkago no Shokuinshitsu is one of the worst things I have ever seen.
+
+Story (3/10)
+The Story is awful, boring, makes no sense and very bland. Its completely predictable and yet it leave you still in shock at how awful it really is.
+
+Art (1/10)
+The art is so ugly that it is distracting. There are scene where the characters are supposed to look "sexy" but you just end up laughing at their tiny heads and their giant shoulders and long spaghetti noodle legs. Its like they were + + + read more +
+
+ +
+
+
+ + +
+
+
+ +
+
+
+
+ +
+

+ + Recommendations +


Recent News


Recent Forum Discussion

+ + + + + + + + + + + + +
Poll: After School in the Teachers` Lounge Episode 1 Discussion
Teddy - Jan 10, 2009
6 repliesby Fourhundr »»
Feb 15, 11:22 AM
Ep 2?
Lilly1x - Feb 8, 2009
3 repliesby Valium »»
Jan 24, 2015 5:23 PM
+
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ + + + +
+ + + +
+ + +
+ +
+
+ + + + + + + + + + diff --git a/tests/mal_scraper/auto_responses/Z2V0Ois6aHR0cDovL215YW5pbWVsaXN0Lm5ldC9hbmltZS8xMTkw b/tests/mal_scraper/auto_responses/Z2V0Ois6aHR0cDovL215YW5pbWVsaXN0Lm5ldC9hbmltZS8xMTkw new file mode 100644 index 0000000..49da551 --- /dev/null +++ b/tests/mal_scraper/auto_responses/Z2V0Ois6aHR0cDovL215YW5pbWVsaXN0Lm5ldC9hbmltZS8xMTkw @@ -0,0 +1,1074 @@ + + + + + + + + +Prince of Tennis: A Day on Survival Mountain - MyAnimeList.net + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ +
+
+ + +
+ +
+
+
+ Edit Anime Information +
+
+ +
What would you like to edit?
+ +   +
+
+

Prince of Tennis: A Day on Survival Mountain

+ + + + + +
+ +
+ + Prince of Tennis: A Day on Survival Mountain + +
+ + + + + + + + + +

+ +

Alternative Titles

+ English: Prince of Tennis: A Day of the Survival Mountain +
+ Synonyms: Tennis no Ouji-sama, Prince of Tennis: Jump Festa 2002 - A Day of the Survival Mountain +
+ Japanese: テニスの王子: 存続山の日 +

+ +

Information

+ +
+ Type: + OVA
+ +
+ Episodes: + 1 +
+ +
+ Status: + Finished Airing +
+ +
+ Aired: + 2003 +
+ + +
+ Producers: + None found, add some
+
+ Licensors: + None found, add some
+
+ Studios: + Production I.G
+ +
+ Source: + Unknown +
+ +
+ Genres: + Adventure, Comedy, Shounen, Sports
+ +
+ Duration: + 30 min. +
+ +
+ Rating: + PG-13 - Teens 13 or older +
+ +
+ +

Statistics

+
+ Score: + 7.471 (scored by 6,828 users) + + +
+ 1 + indicates a weighted score. Please note that 'Not yet aired' titles are excluded. + +
+
+
+ Ranked: + #16982 +
+ 2 + based on the top anime page. Please note that 'Not yet aired' and 'R18+' titles are excluded. + +
+
+
+ Popularity: + #2924 +
+
+ Members: + 12,151 +
+
+ Favorites: + 47 +
+ + +
+ +
+
+ +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ 7.47 +
Ranked #1698Popularity #2924Members 12,151
Add to List
+ Episodes: /1
buy from amazon
+

Synopsis

Echizen and the Seigaku regulars took a day off of their normal routines and went hiking on a mountain, where a tennis resort awaits their arrival. Expecting to do some special training, the team reaches the destination only to find their precious tennis courts taken over by a group of college tennis players. However, Ryoma is more than happy to teach them a thing or two about how to play "real" tennis.
+
+(Source: ANN)

Background

No background information has been added to this title. Help improve our database by adding background information here.
+
+
+ +
+
+
+
+ +
+

Related Anime


Characters & Voice Actors

+ + + + + +
+
Echizen, Ryouma
+
+ Echizen, Ryouma +
Main
+
+ + + + + +
+ Minagawa, Junko
+ Japanese +
Minagawa, Junko
+
+
+ + + + + +
+
Fuji, Shuusuke
+
+ Fuji, Shuusuke +
Main
+
+ + + + + +
+ Kaida, Yuki
+ Japanese +
Kaida, Yuki
+
+
+ + + + + +
+
Tezuka, Kunimitsu
+
+ Tezuka, Kunimitsu +
Main
+
+ + + + + +
+ Okiayu, Ryotaro
+ Japanese +
Okiayu, Ryotaro
+
+
+ + + + + +
+
Kikumaru, Eiji
+
+ Kikumaru, Eiji +
Main
+
+ + + + + +
+ Takahashi, Hiroki
+ Japanese +
Takahashi, Hiroki
+
+

Staff

+ + + + + + + + + + + + + + + + + + + +
Hiramitsu, Takuya
Hiramitsu, Takuya +
Sound Director
Watanabe, Cheru
Watanabe, Cheru +
Music
Kondou, Keiichi
Kondou, Keiichi +
Key Animation
Ishii, Akiharu
Ishii, Akiharu +
Character Design


+
+

+ Edit + Opening Theme +

+
+ No opening themes have been added to this title. Help improve our database by adding an opening theme here. +
+
+
+ +
+

+ Edit + Ending Theme +

+
+ No ending themes have been added to this title. Help improve our database by adding an ending theme here. +
+
+
+

+
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+
+


More reviewsReviews

+ +
+
+
+ Oct 8, 2008 + +
+ Overall Rating: + 7 +
+
+ + + + + +
+
+ + + +
+
+ ADAWG + (All reviews)
+ +
+
+
+
+ + + + ___________________________________________ Review the 7th
+
+Chihuahua Review(short&sweet): A decent additional episode to the Prince of Tennis series.
+
+------------------------------>In Depth Review:<------------------------
+STORY: Nothing really special about this episode. Here we have Echizen and his Seigaku headed for a tennis resort where they meet up with some unfriendly college tennis players. As a huge Prince of Tennis fan I was pretty disappointed with this episode. The only tennis match of the episode lasted maybe 3 or 5 minutes and that wasnt really spectacular other than a new shot that really wasnt that new.
+
+ART: Art was well done again the characters looked vibrant and the animation quality is still improving. But still + + + read more +
+
+ +
+
+ + +
+
+
+ May 20, 2011 + +
+ Overall Rating: + 8 +
+
+ + + + + +
+
+ + + +
+
+ simonfan + (All reviews)
+ +
+
+
+
+ + + + Prince of Tennis: A Day on Survival Mountain is one of the few OVAs that contains side stories of the series yet fairly entertaining.
+
+Story: Nothing special; it's just your typical non main plot-related episode with tennis-related activities and some humor thrown in. Though, aside from that, you find it quite entertaining and could keep you watching until the end. The only problem is that there isn't much tennis action, and the longest match could have been 7 minutes or less, but I don't mind that.
+
+Art: One of the strongest points in The Prince of Tennis series. There is a small improvement in the animation, + + + read more +
+
+ +
+
+
+ + +
+
+ + +
+
+
+ + +
+

Recommendations


Recent News


Recent Forum Discussion

No discussion topic was found.
+
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ + + + +
+ + + +
+ + +
+ +
+
+ + + + + + + + + + diff --git a/tests/mal_scraper/auto_responses/Z2V0Ois6aHR0cDovL215YW5pbWVsaXN0Lm5ldC9hbmltZS8xNQ== b/tests/mal_scraper/auto_responses/Z2V0Ois6aHR0cDovL215YW5pbWVsaXN0Lm5ldC9hbmltZS8xNQ== new file mode 100644 index 0000000..5769647 --- /dev/null +++ b/tests/mal_scraper/auto_responses/Z2V0Ois6aHR0cDovL215YW5pbWVsaXN0Lm5ldC9hbmltZS8xNQ== @@ -0,0 +1,1389 @@ + + + + + + + + +Eyeshield 21 - MyAnimeList.net + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ +
+
+ + +
+ +
+
+
+ Edit Anime Information +
+
+ +
What would you like to edit?
+ +   +
+
+

Eyeshield 21

+ + + + + +
+ +
+ + Eyeshield 21 + +
+ + + + + + + + + +

+ +

Alternative Titles

+ Synonyms: Eyeshield21 +
+ Japanese: アイシールド21 +

+ +

Information

+ +
+ Type: + TV
+ +
+ Episodes: + 145 +
+ +
+ Status: + Finished Airing +
+ +
+ Aired: + Apr 6, 2005 to Mar 19, 2008 +
+ +
+ Premiered: + Spring 2005 +
+ +
+ Broadcast: + Unknown +
+ + +
+ Licensors: + Sentai Filmworks
+
+ Studios: + Studio Gallop
+ +
+ Source: + Manga +
+ +
+ Genres: + Action, Sports, Comedy, Shounen
+ +
+ Duration: + 23 min. per ep. +
+ +
+ Rating: + PG-13 - Teens 13 or older +
+ +
+ +

Statistics

+
+ Score: + 8.071 (scored by 42,134 users) + + +
+ 1 + indicates a weighted score. Please note that 'Not yet aired' titles are excluded. + +
+
+
+ Ranked: + #4472 +
+ 2 + based on the top anime page. Please note that 'Not yet aired' and 'R18+' titles are excluded. + +
+
+
+ Popularity: + #735 +
+
+ Members: + 90,048 +
+
+ Favorites: + 1,503 +
+ + +
+ +
+
+ +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ 8.07 +
Ranked #447Popularity #735Members 90,048
Add to List
+ Episodes: /145
buy from amazon
+

Synopsis

Sena is like any other shy kid starting high school; he's just trying to survive. Constantly bullied, he's accustomed to running away.
+
+Surviving high school is about to become a lot more difficult after Hiruma, captain of the school's American football team, witnesses Sena's incredible agility and speed during an escape from some bullies. Hiruma schemes to make Sena the running back of his school team, The Devil Bats, hoping that it will turn around the squad's fortunes from being the laughingstock of Japan's high school leagues, to title contender.
+
+To protect his precious star player from rivaling recruiters, he enlists Sena as "team secretary," giving him a visored helmet and the nickname "Eyeshield 21" to hide his identity.
+
+The Devilbats will look to make their way to the Christmas Bowl, an annual tournament attended by the best football teams in Japan, with "Eyeshield 21" leading the way. Will they be able to win the Christmas Bowl? Will Sena be able to transform from a timid, undersized freshman to an all-star player? Put on your pads and helmet to find out!

Background

Eyeshield 21 was original scheduled to stream in North America on Toonami Jetstream and NFL Rush in collaboration with the National Football League, but the plan fell through and the anime made its debut only on Toonami Jetstream, which later dropped the series. It would then become available in its entirety on Crunchryroll. Sentai Filmworks later licensed and released the first 52 episodes on DVD from 2010 to 2011.
+
+
+ +
+
+
+
+ +
+

Related Anime


Characters & Voice Actors

+ + + + + +
+
Hiruma, Youichi
+
+ Hiruma, Youichi +
Main
+
+ + + + + +
+ Tamura, Atsushi
+ Japanese +
Tamura, Atsushi
+
+
+ + + + + +
+
Kobayakawa, Sena
+
+ Kobayakawa, Sena +
Main
+
+ + + + + + + + + +
+ Irino, Miyu
+ Japanese +
Irino, Miyu
+
+ Kikuchi, Kokoro
+ Japanese +
Kikuchi, Kokoro
+
...
+
+ + + + + +
+
Kurita, Ryokan
+
+ Kurita, Ryokan +
Main
+
+ + + + + +
+ Nagano, Kouichi
+ Japanese +
Nagano, Kouichi
+
+
+ + + + + +
+
Raimon, Tarou
+
+ Raimon, Tarou +
Main
+
+ + + + + +
+ Yamaguchi, Kappei
+ Japanese +
Yamaguchi, Kappei
+
+

Staff

+ + + + + + + + + + + + + + + + + + + +
Miyake, Masanori
Miyake, Masanori +
Producer
Nishita, Masayoshi
Nishita, Masayoshi +
Director, Episode Director, Storyboard, Key Animation
Ooba, Hideaki
Ooba, Hideaki +
Episode Director, Storyboard
Okumura, Yoshiaki
Okumura, Yoshiaki +
Episode Director


+
+

+ Edit + Opening Theme +

+
#1: "Breakthrough" by Coming Century (eps 1-35)
#2: "Innocence" by 20th Century (ep 36- 64)
#3: "Dang Dang" by ZZ (eps 65-103)
#4: "BLAZE LINE" by BACK-ON (ep 104-126)
#5: "Hanno no Runningback" by SHORT LEG SUMMER (eps 127-145)
+
+
+ +
+

+ Edit + Ending Theme +

+
#1: "Be Free" by Rikken'z (eps 1-13)
#2: "Blaze Away" by TRAX (eps 14-35)
#3: "Goal" by Arashiro Beni (eps 36-64)
#4: "Run to Win" by Mamori (Aya Hirano), Sena (Miyu Irino), Kurita (Koichi Nagano), Rimon (Kappei Yamaguchi) (eps 65 - 100)
#5: "A day dreaming..." by BACK-ON (eps 101-116)
#6: "Flower" by BACK-ON (eps 117-126)
#7: "Song of Power" by SHORT LEG SUMMER (eps 127-144)
#8: "Dang Dang" by ZZ (ep 145)
+
+
+

+
+
+ +
+
+
+
+ +
+
+
+
+
+
+
+
+


More reviewsReviews

+ +
+
+
+ Feb 18, 2009 + +
+ Overall Rating: + 8 +
+
+ + + + + +
+
+ + + +
+
+ Poparteeb + (All reviews)
+ +
+
+
+
+ + + + How long is it? 145 episodes. What’s it about? American Football. All of it? Yes. (And if you liked this series but found it either too long, or a bit childish, definitely check out Cross Game, a highly underrated sports series that is on a whole different maturity and story level.)
+
+Eyeshield 21 is definite shonen sports anime. Heck, its even sponsored by the Japanese NFL and received backing in the United States as a football series on a sports channel. And now,…don’t get turned off. Because if you do, you’re missing out on one of the most entertaining series people disregard just because of its + + + read more +
+
+ +
+
+ + +
+
+
+ Sep 4, 2015 + +
+ Overall Rating: + 7 +
+
+ + + + + +
+
+ + + +
+
+ Pneumonic + (All reviews)
+ +
+
+
+
+ + + + **This review is spoiler free**
+
+At first glance, there are a lot of reasons why one might not want to watch this show. It's about American Football (narrowing down its audience that might even know what is going on down to just the United States). As stated, Eyeshield 21 is a sports anime, another thing many potential viewers might not like. Lastly, it's shonen, meaning everyone and their brother has probably heard of it before. So why should you watch it? I'll tell you.
+
+Story- 6/10
+
+This is easily the weakest point of Eyeshield 21. The story isn't anything that will blow your mind, it isn't anything that + + + read more +
+
+ +
+
+ + +
+
+
+ Dec 21, 2008 + +
+ Overall Rating: + 10 +
+
+ + + + + +
+
+ + + +
+
+ graysky14 + (All reviews)
+ +
+
+
+
+ + + + At first glance, many thought that American football is all about muscle and killing intent. As a child, I watched NFL games and saw players hurt, injured, worst; crushed, suffer fractures and other accidents that led them to disability. As a sportsman(once a varsity basketball player), I hate games runned by power and skill alone.
+
+Ya-HA!
+Enters Eyeshield 21 that features a with unorthodox players such as shorty, porky and a Demon. The plot is very simple, about an errand boy who became a superstar in a game played by monsters and his team, the Devil Bats journey to National Championships, the Christmas Bowl. It highlights the + + + read more +
+
+ +
+
+ + +
+
+
+ Jan 2, 2009 + +
+ Overall Rating: + 6 +
+
+ + + + + +
+
+ + + +
+
+ ladyxzeus + (All reviews)
+ +
+
+
+
+ + + + Eyeshield 21 is an essay in 145 episodes about... American Football! A game that I don't know, like or understand, portrayed in anime! A game that we always believed that was only played in America... In anime! Conclusion: Must Watch.
+
+The story is as simple as "sports anime": a team and its players, represented by the Speed-Light Running Back Kobayakawa Sena as main character, must overcome stronger teams and players by evoluting physically and spiritually in way to get to the ultimate victory (participating in the Christmas Bowl). However, this team is not like your average! They are below the average! In the end, this is + + + read more +
+
+ +
+
+
+ + +
+
+ + +
+
+
+ + +
+

+ + Recommendations +


Recent News

Section23 Films Acquires Asu no Yoichi!, Eyeshield 21 and Jigoku Shoujo 2

+

According to Toon Zone news, Section23 Films has acquired three new titles: Asu no Yoichi! (May 11th) Eyeshield 21 (May 18th) Jigoku Shoujo Futakomori (May 25) They&...read more

+
+

Recent Forum Discussion

+ + + + + + + + + + + + +
Poll: Eyeshield 21 Episode 55 Discussion
notestinet - Jun 13, 2008
7 repliesby sakamoto-kun »»
Apr 29, 5:13 AM
Poll: Eyeshield 21 Episode 54 Discussion
notestinet - Jun 13, 2008
10 repliesby sakamoto-kun »»
Apr 29, 4:52 AM

Recent Featured Articles

+ +
+ Top 15 Best Sports Anime of All Time +
+

+ Top 15 Best Sports Anime of All Time +

+
+ The best sports anime are about more than just the sport itself. They're about friendship, struggle, growth, and achieving your dreams. Here are 15 of the best. +
+
+

+ by Law_Light +

+ 73,703 views +

+
+
+ +
+ 20 Popular Anime Catchphrases: Do You Even Tuturu? +
+

+ 20 Popular Anime Catchphrases: Do You Even Tuturu? +

+
+ How do you make an anime character unforgettable? Well, just let it repeat a catchphrase over and over until the anime ends! It will surely leave a lasting impression on the viewer... and it may even end up as a ringtone. +
+
+

+ by llezur17 +

+ 29,790 views +

+
+
+
+
+
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+
+ + + + +
+ + + +
+ + +
+ +
+
+ + + + + + + + + + diff --git a/tests/mal_scraper/conftest.py b/tests/mal_scraper/conftest.py index 1d57a98..4ff25b4 100644 --- a/tests/mal_scraper/conftest.py +++ b/tests/mal_scraper/conftest.py @@ -91,6 +91,11 @@ class ResponsesWrapper: @pytest.yield_fixture(autouse=True) def mock_requests(request): """Mock all requests unless the LIVE_RESPONSES environ has been set.""" + + # MAL URLs should be HTTP for mocking + import mal_scraper.__init__ + mal_scraper.__init__.FORCE_HTTP = True + use_live = bool(os.environ.get('LIVE_RESPONSES', False)) with responses.RequestsMock(assert_all_requests_are_fired=True) as rsps: yield ResponsesWrapper(rsps, use_live) diff --git a/tests/mal_scraper/test_anime.py b/tests/mal_scraper/test_anime.py index cd5b445..7d2919a 100644 --- a/tests/mal_scraper/test_anime.py +++ b/tests/mal_scraper/test_anime.py @@ -7,18 +7,18 @@ import pytest import mal_scraper -def test_download_first(mock_requests): +def test_get_anime_successful(mock_requests): """Can we retrieve the first show ever?""" mock_requests.optional_mock('http://myanimelist.net/anime/1') - meta, info = mal_scraper.retrieve_anime(1) + meta, info = mal_scraper.get_anime(1) # Fuzzy match datetime assert datetime.utcnow() - meta['when'] < timedelta(seconds=30) - assert meta == { + # Assert meta contained by ... + assert meta.items() >= { 'id_ref': 1, - 'when': meta['when'], # UTC Datetime - } + }.items() assert info == { 'name': 'Cowboy Bebop', @@ -26,8 +26,8 @@ def test_download_first(mock_requests): 'format': mal_scraper.Format.tv, 'episodes': 26, # None means unknown 'airing_status': mal_scraper.AiringStatus.finished, - 'airing_started': date(year=1998, month=4, day=3), # None means unknown - 'airing_finished': date(year=1999, month=4, day=24), # None means unknown + 'airing_started': date(year=1998, month=4, day=3), + 'airing_finished': date(year=1999, month=4, day=24), 'airing_premiere': (1998, mal_scraper.Season.spring), # 'age_rating': mal_scraper.AgeRating.restricted, # 'mal_score': 0, @@ -38,30 +38,79 @@ def test_download_first(mock_requests): } -def test_download_first_fail(mock_requests): - """Do we get a failed success if the page was bad?""" +def test_parsing_a_bad_page_raises_an_error(mock_requests): mock_requests.always_mock( 'http://myanimelist.net/anime/1', 'garbled_anime_page', ) with pytest.raises(mal_scraper.ParseError): - mal_scraper.retrieve_anime(1) + mal_scraper.get_anime(1) -def test_parsing_unknown_episodes(mock_requests): +def test_parsing_name_english_that_is_missing(mock_requests): + mock_requests.optional_mock('http://myanimelist.net/anime/15') + meta, data = mal_scraper.get_anime(15) + assert data['name_english'] == '' + + +def test_parsing_episodes_that_is_unknown(mock_requests): """Do we return None for an unknown number of episodes?""" mock_requests.always_mock( 'http://myanimelist.net/anime/32105', 'unknown_episodes', ) - - assert mal_scraper.retrieve_anime(32105)[1]['episodes'] is None + assert mal_scraper.get_anime(32105)[1]['episodes'] is None -def test_parsing_unknown_end_date(mock_requests): +def test_parsing_airing_started_with_year_and_month_only(mock_requests): + """Do we return the year and month if the day is missing?""" + mock_requests.optional_mock('http://myanimelist.net/anime/730') + meta, data = mal_scraper.get_anime(730) + assert data['airing_started'] == date(1994, 4, 1) # "Apr 1994" + + +def test_parsing_airing_started_with_year_only(mock_requests): + """Do we return the year and month if the day is missing?""" + mock_requests.optional_mock('http://myanimelist.net/anime/1190') + meta, data = mal_scraper.get_anime(1190) + assert data['airing_started'] == date(2003, 1, 1) # "2003" + + +def test_parsing_end_date_that_is_unknown(mock_requests): mock_requests.always_mock( 'http://myanimelist.net/anime/32105', 'unknown_end_date', ) + assert mal_scraper.get_anime(32105)[1]['airing_finished'] is None - assert mal_scraper.retrieve_anime(32105)[1]['airing_finished'] is None + +def test_parsing_airing_started_without_end_date(mock_requests): + mock_requests.optional_mock('http://myanimelist.net/anime/5') + meta, data = mal_scraper.get_anime(5) + assert data['airing_started'] == date(2001, 9, 1) + assert data['airing_finished'] is None + + +@pytest.mark.parametrize('id_ref', [ + 5, # Film + 44, # OVA + 574, # ONA +]) +def test_parsing_missing_premiere(mock_requests, id_ref): + mock_requests.optional_mock('http://myanimelist.net/anime/%d' % id_ref) + assert mal_scraper.get_anime(id_ref).data['airing_premiere'] is None + + +def test_user_discovery_on_anime_page(mock_requests): + mock_requests.optional_mock('http://myanimelist.net/anime/1') + meta, info = mal_scraper.get_anime(1) + + html = meta['response'].text + usernames = list(mal_scraper.discover_users_from_html(html)) + assert usernames == [ + 'TheLlama', 'TheLlama', 'TheLlama', 'TheLlama', 'Polyphemus', + 'Polyphemus', 'Polyphemus', 'Polyphemus', 'DeusAnima', 'DeusAnima', + 'DeusAnima', 'DeusAnima', 'TheCriticsClub', 'TheCriticsClub', + 'TheCriticsClub', 'TheCriticsClub', 'ElectricSlime', 'Mana', 'Scribbly', + 'Legg91', 'Metty', 'Darius', 'tokaicentral85', 'Ai_Sakura', + ]