Skip to main content

Simple Anime Web Scraper.

Project description

Anime Web Scraper

Scrapes anime data from https://myanimelist.net/ .

Anime Model Data

These are, as for now, the only available data.

  • Title
  • English Title
  • Japanese Title
  • Synonyms
  • Synopsis
  • Anime Type
  • Episodes
  • Genres
  • Poster (link)
  • Trailer (link)

Installation

pip install pymalscraper

Basic Usage

from pymalscraper.scraper import MALScraper
scraper = MALScraper()
anime = scraper.get_anime("kimi no na wa.")

> anime.title
'Kimi no na wa.'
> anime.english_title
'Your Name.'
> anime.japanese_title
'君の名は。'
> anime.synonyms
''
> anime.synopsis
"Mitsuha Miyamizu, a high school girl, yearns to live the life of a boy in the bustling city of Tokyo—a dream that stands in stark contrast to her present life in the countryside. Meanwhile in the city, Taki Tachibana lives a busy life as a high school student while juggling his part-time job and hopes for a future in architecture.\n\r\nOne day, Mitsuha awakens in a room that is not her own and suddenly finds herself living the dream life in Tokyo—but in Taki's body! Elsewhere, Taki finds himself living Mitsuha's life in the humble countryside. In pursuit of an answer to this strange phenomenon, they begin to search for one another.\n\nKimi no Na wa. revolves around Mitsuha and Taki's actions, which begin to have a dramatic impact on each other's lives, weaving them into a fabric held together by fate and circumstance.\n\r\n[Written by MAL Rewrite]"
> anime.animetype
'Movie'
> anime.episodes
'1'
> anime.genres
'Romance, Supernatural, School, Drama'
> anime.poster
'https://cdn.myanimelist.net/images/anime/5/87048.jpg'
> anime.trailer
'https://www.youtube.com/embed/3KR8_igDs1Y?enablejsapi=1&wmode=opaque&autoplay=1'

# To get the full data. By default, this returns json.
> anime.get_data()
{'title': 'Kimi no Na wa.', 'english_title': 'Your Name.', 'japanese_title': '君の名は。', 'synonyms': None, 'synopsis': "Mitsuha Miyamizu, a high school girl, yearns to live the life of a boy in the bustling city of Tokyo—a dream that stands in stark contrast to her present life in the countryside. Meanwhile in the city, Taki Tachibana lives a busy life as a high school student while juggling his part-time job and hopes for a future in architecture.\n\r\nOne day, Mitsuha awakens in a room that is not her own and suddenly finds herself living the dream life in Tokyo—but in Taki's body! Elsewhere, Taki finds himself living Mitsuha's life in the humble countryside. In pursuit of an answer to this strange phenomenon, they begin to search for one another.\n\nKimi no Na wa. revolves around Mitsuha and Taki's actions, which begin to have a dramatic impact on each other's lives, weaving them into a fabric held together by fate and circumstance.\n\r\n[Written by MAL Rewrite]", 'type': 'Movie', 'episodes': '1', 'genres': 'Romance, Supernatural, School, Drama', 'poster': 'https://cdn.myanimelist.net/images/anime/5/87048.jpg', 'trailer': 'https://www.youtube.com/embed/3KR8_igDs1Y?enablejsapi=1&wmode=opaque&autoplay=1'}

# To get the anime url    
> scraper.get_anime_url('kimi no na wa.')
'https://myanimelist.net/anime/32281/Kimi_no_Na_wa'

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymalscraper-1.1.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

pymalscraper-1.1.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file pymalscraper-1.1.0.tar.gz.

File metadata

  • Download URL: pymalscraper-1.1.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for pymalscraper-1.1.0.tar.gz
Algorithm Hash digest
SHA256 72616a44b0fcdf3d9ad5a21358da3aee676e220fee58fd1ba286cfa362b6aa57
MD5 7d231bd0c9ace131c4534c94c7e9ba60
BLAKE2b-256 9dcd13498cf4f3fa46bef1b71ecc4a79aa71ed450dca4c7ed33f2881e7a394fd

See more details on using hashes here.

File details

Details for the file pymalscraper-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pymalscraper-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3

File hashes

Hashes for pymalscraper-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 08d27fb9eb372c2469b65abf8671c2bdfa394c72669d6f8e5f9466b214384eb5
MD5 6b33301613e14cae75506f541e37a2bb
BLAKE2b-256 107f99489839dabc026746261e34bc060d37724ebf3986947e68a63854725379

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page