development version

This commit is contained in:
JuanjoSalvador
2017-08-13 17:02:15 +02:00
parent 9cb2403b0c
commit 1c5c85e9d9
5 changed files with 122 additions and 111 deletions

View File

@@ -1,20 +1,41 @@
from NyaaPy.nyaa import Nyaa
from NyaaPy.nyaa import NyaaPantsu
import json
from NyaaPy import Nyaa, NyaaPantsu
# Nyaa.si results
nyaa_query = Nyaa.search('koe no katachi 1080')
def nyaa_search():
nyaa_query = Nyaa.search('koe no katachi 1080')
if len(nyaa_query) > 0:
for result in nyaa_query:
if len(nyaa_query) > 0:
for result in nyaa_query:
print(result['title'])
else:
print('Nothing here!')
def nyaa_news():
news = Nyaa.news(5)
for result in news:
print(result['title'])
else:
print('Nothing here!')
# Nyaa.pantsu.cat results
pantsu_query = NyaaPantsu.search('new game!!')
if len(pantsu_query) > 0:
for result in pantsu_query:
def pantsu_search():
pantsu_query = NyaaPantsu.search('new game!!')
if len(pantsu_query) > 0:
for result in pantsu_query:
print(result['title'])
else:
print('Nothing here!')
def pantsu_news():
news = NyaaPantsu.news(5)
for result in news:
print(result['title'])
else:
print('Nothing here!')
# Uncomment whatever you want to test
#nyaa_search()
#pantsu_search()
#nyaa_news()
pantsu_news()