All Projects → pushrbx → python3-mal

pushrbx / python3-mal

Licence: WTFPL license
Python interface to MyAnimeList

Projects that are alternatives of or similar to python3-mal

Mal4J
Java wrapper for the official MyAnimeList API
Stars: ✭ 23 (+27.78%)
Mutual labels:  mal, myanimelist-api, myanimelist
anilist-to-mal
A python tool that will export your Anilist.co anime list for MAL importing
Stars: ✭ 33 (+83.33%)
Mutual labels:  mal, myanimelist-api, myanimelist
kuristina
An API that lets you fetch user lists from MyAnimeList.
Stars: ✭ 14 (-22.22%)
Mutual labels:  mal, myanimelist-api, myanimelist
MalScraper
Scrape everything you can from MyAnimeList.net
Stars: ✭ 132 (+633.33%)
Mutual labels:  myanimelist-api, myanimelist
myanimelist-api-v2
An awesome wrapper on Nodejs for the new MyAnimeList's API v2!
Stars: ✭ 30 (+66.67%)
Mutual labels:  myanimelist-api, myanimelist
jikan.rb
A simple Ruby wrapper for jikan.moe API.
Stars: ✭ 15 (-16.67%)
Mutual labels:  myanimelist-api, myanimelist
Jikan4java
Kotlin wrapper for Jikan, an myanimelist api
Stars: ✭ 27 (+50%)
Mutual labels:  myanimelist-api, myanimelist
nyaamal
A chrome extension to download anime torrents directly from MyAnimeList and Anilist
Stars: ✭ 75 (+316.67%)
Mutual labels:  mal, myanimelist
Jikan
Unofficial MyAnimeList PHP+REST API which provides functions other than the official API
Stars: ✭ 531 (+2850%)
Mutual labels:  parsing, myanimelist
arm
A JSON-based database to relational mapping Anime ID's between MyAnimeList, Annict, AniList and Syoboi Calendar
Stars: ✭ 25 (+38.89%)
Mutual labels:  mal, myanimelist
Jikan Rest
The REST API for Jikan
Stars: ✭ 200 (+1011.11%)
Mutual labels:  parsing, myanimelist
yellowpages-scraper
Yellowpages.com Web Scraper written in Python and LXML to extract business details available based on a particular category and location.
Stars: ✭ 56 (+211.11%)
Mutual labels:  parsing, lxml
DrawRacket4Me
DrawRacket4Me draws trees and graphs from your code, making it easier to check if the structure is what you wanted.
Stars: ✭ 43 (+138.89%)
Mutual labels:  parsing
SteamLicenseParser
📦 Parsers your Steam licenses and generates some stats
Stars: ✭ 23 (+27.78%)
Mutual labels:  parsing
MathExpressions.NET
➗ Library for parsing math expressions with rational numbers, finding their derivatives and compiling an optimal IL code
Stars: ✭ 63 (+250%)
Mutual labels:  parsing
yaml.sh
Read YAML files with only Bash
Stars: ✭ 30 (+66.67%)
Mutual labels:  parsing
node-c-parser
A recursive decent parser for C programming language codes
Stars: ✭ 33 (+83.33%)
Mutual labels:  parsing
JagTag
📝 JagTag is a simple - yet powerful and customizable - interpretted text parsing language!
Stars: ✭ 40 (+122.22%)
Mutual labels:  parsing
BibleUtilities
Set of utilities to scan, parse, and work with Bible references.
Stars: ✭ 20 (+11.11%)
Mutual labels:  parsing
AniList-Extras
Simple userscript/extension for AniList that adds a few additional features.
Stars: ✭ 37 (+105.56%)
Mutual labels:  myanimelist

Not developing this anymore

Better to use MAL's v2 API or Jikan:

python3-mal pypi download pypi download

Provides programmatic access to MyAnimeList data. This is a fork of python-mal. It uses lxml instead of beautifulsoup, and it's working with python 3. There are automatic travis and teamcity builds on every last sunday of the month to ensure that the package is working fine with the current version of MAL.

Dependencies

  • python 3.* (tested with 3.7 and 3.8)
  • pytz
  • requests
  • lxml
  • nose (only if you want to run tests, though!)
  • cssselect

Installation

After cloning the repository, navigate to the directory and run python setup.py install.

Getting Started

The myanimelist.session.Session class handles requests to MAL, so you'll want to create one first:

from myanimelist.session import Session
s = Session()

Then if you want to fetch an anime, say, Cowboy Bebop:

bebop = s.anime(1)
print bebop

Objects in python-mal are lazy-loading: they won't go out and fetch MAL info until you first-request it. So here, if you want to retrieve, say, the things related to Cowboy Bebop:

for how_related,items in bebop.related.iteritems():
  print how_related
  print "============="
  for item in items:
    print item
  print ""

You'll note that there's a pause while Cowboy Bebop's information is fetched from MAL.

Documentation

To find out more about what python-mal is capable of, visit the docs here.

Testing

Testing requires nose. To run the tests that come with python-mal:

  1. Navigate to the python-mal directory
  2. Create a textfile named credentials.txt and put your MAL username and password in it, separated by a comma, or set environment variables named MAL_USERNAME and MAL_PASSWORD with the appropriate values.
  3. Run nosetests.

Make sure you don't spam the tests too quickly! One of the tests involves POSTing invalid credentials to MAL, so you're likely to be IP-banned if you do this too much in too short a span of time.

Differences from the original repo

  • Instead of beautiful soup this module uses lxml
  • There are scheduled tests every sunday.
  • I've removed some of the functionalities: popular tags parsing and favourite parsing on user profiles because they were unstable.

Change log

0.2.7 - Adapted MAL changes: characters and staff on datasheets have absolute urls. Staff table has been changed to multiple table elements.
0.2.6 - added broadcast time parsing for currently aired anime shows and added some minor fixes.
0.2.5 - added promotion video parsing on anime datasheets
0.2.4 - Adapted to the new MAL ssl enforcement
0.2.3.1 - upgraded to requests 2.11
0.2.3.0 - performance improvements in xpath queries.
0.2.2 - adapted to new SEO url rule changes and DOM changes on MAL.
0.2.1 - replaced beautifulsoup with lxml.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].