| Build Status | |
|---|---|
| Travis |
python3-mal

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:
- Navigate to the python-mal directory
- Create a textfile named
credentials.txtand put your MAL username and password in it, separated by a comma, or set environment variables namedMAL_USERNAMEandMAL_PASSWORDwith the appropriate values. - 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.
Metadata
Release files for python3-mal 0.2.21
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python3_mal-0.2.21-py3-none-any.whl | Python 3 | none | any | Details for python3_mal-0.2.21-py3-none-any.whl |
Release files / python3_mal-0.2.21-py3-none-any.whl
| Download URL | python3_mal-0.2.21-py3-none-any.whl |
|---|---|
| Size | 40.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3dd0af9151068e5cc5dc4576bb46d3e960198179ad83cc370b10a2abb296c5a9
|
|
BLAKE2b-256 checksum How to use checksums |
4d6f505491ef039fa69e3dd9413fe32f032fbbe32151171f143e9e0ee6e28bc8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
|
Security for python3-mal 0.2.21
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.