Files
KomSuite-NyaaPy/tests/test.py
JuanjoSalvador 9cb2403b0c 0.3.1 - Fixed #1
2017-08-12 22:49:27 +02:00

21 lines
458 B
Python

from NyaaPy.nyaa import Nyaa
from NyaaPy.nyaa import NyaaPantsu
import json
# Nyaa.si results
nyaa_query = Nyaa.search('koe no katachi 1080')
if len(nyaa_query) > 0:
for result in nyaa_query:
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:
print(result['title'])
else:
print('Nothing here!')