nyaa.pantsu.cat update
This commit is contained in:
@@ -2,10 +2,13 @@ from NyaaPy import Nyaa, NyaaPantsu
|
||||
|
||||
# Nyaa.si results
|
||||
def nyaa_search():
|
||||
nyaa_query = Nyaa.search(keyword='koe no katachi 1080', category=1, subcategory=0, filters=0, page=0)
|
||||
try:
|
||||
nyaa_query = Nyaa.search(keyword='koe no katachi 1080', category=1, subcategory=0, page=0)
|
||||
|
||||
for nyaa in nyaa_query:
|
||||
print(nyaa)
|
||||
for nyaa in nyaa_query:
|
||||
print(nyaa)
|
||||
except TypeError as te:
|
||||
print(te)
|
||||
|
||||
def nyaa_news():
|
||||
news = Nyaa.news(number_of_results=5)
|
||||
@@ -15,22 +18,14 @@ def nyaa_news():
|
||||
# Nyaa.pantsu.cat results
|
||||
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'])
|
||||
print(NyaaPantsu.news(1))
|
||||
|
||||
# Uncomment whatever you want to test
|
||||
|
||||
#nyaa_search()
|
||||
#pantsu_search()
|
||||
nyaa_news()
|
||||
#pantsu_news()
|
||||
#nyaa_news()
|
||||
pantsu_news()
|
||||
Reference in New Issue
Block a user