https://github.com/jwebcoder/animapy
An anime API for python.
https://github.com/jwebcoder/animapy
Last synced: about 1 year ago
JSON representation
An anime API for python.
- Host: GitHub
- URL: https://github.com/jwebcoder/animapy
- Owner: JWebCoder
- License: gpl-2.0
- Created: 2014-10-09T18:37:17.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-12-08T19:27:19.000Z (over 11 years ago)
- Last Synced: 2025-04-01T02:42:43.634Z (about 1 year ago)
- Language: Python
- Size: 351 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Animapy
=======
An anime API for python.
##Installation
Run `pip install Animapy`, or clone the repo and run `python setup.py install`.
##Info
The PT subbed episodes comes from Anitube website.
The EN subbed episodes comes from NWanime website.
##Usage:
####To get the results of a search:
```python
from animapy import anime
teste1 = anime.searchAnimes('naruto 382', quant=10)
teste2 = anime.searchAnimes('naruto', quant=10, lang='en')
print '\nPt Version:\n'
for ep in teste1:
if ep != '':
print 'Title: ' + ep.title
print 'Image: ' + ep.image
print 'Normal: ' + ep.normal
if hasattr(ep, 'hd'):
print 'HD: ' + ep.hd
print '\n'
print '\n\nEn Version:\n'
for ep in teste2:
if ep != '':
print 'Title: ' + ep.title
print 'Image: ' + ep.image
if hasattr(ep, 'normal'):
print 'Normal: ' + ep.normal
print '\n'
```
####To get just the title and images of a search:
```python
from animapy import anime
teste1 = anime.searchAnimesMetadata('naruto 382', quant=3)
teste2 = anime.searchAnimesMetadata('naruto', quant=3, lang='en')
print '\nPt Version:\n'
for ep in teste1:
if ep != '':
print 'Title: ' + ep.title
print 'Image: ' + ep.image
print '\n'
print '\n\nEn Version:\n'
for ep in teste2:
if ep != '':
print 'Title: ' + ep.title
print 'Image: ' + ep.image
print '\n'
```
####To get just the link of the anime file:
```python
from animapy import anime
teste1 = anime.getAnimeLinks('http://www.anitube.se/video/79734/Ai-Tenchi-Muyo--22')
teste2 = anime.getAnimeLinks('http://www.nwanime.com/one-piece-episode-668/video/69a0b530b6b09a092bf0/', lang='en')
print '\nPt Version:\n'
print 'Normal: ' + teste1.normal
if hasattr(teste1, 'hd'):
print 'HD: ' + teste1.hd
print '\n'
print '\n\nEn Version:\n'
print 'Normal: ' + teste2.normal
print '\n'
```