Nyaa.si parser converted to LXML (except view user info)

This commit is contained in:
Ferenc Nánási
2020-01-15 21:05:22 +01:00
parent 03f030914b
commit 95b967b940
4 changed files with 99 additions and 333 deletions

View File

@@ -3,7 +3,20 @@ from pprint import pprint
# pantsu = Pantsu()
nyaa = Nyaa()
pprint(nyaa.last_uploads(5))
# Get fresh torrents
print("Latest torrents:")
latest_torrents = rnyaa.last_uploads(5)
# I'd like to watch Tenki no ko, but not uploaded yet.
print("Search results for Kimi no Na wa:")
test_search = nyaa.search("Kimi no Na wa")
pprint(test_search)
# Get first torrent from found torrents
print("First result torrent info:")
single_torrent = nyaa.get(test_search[0]["id"])
pprint(single_torrent)
"""
print(pantsu.search(keyword='koe no katachi',