From 05396a1bd056cc5c6336213ee4746262a1969a5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jennifer=20S=C3=A1nchez?= Date: Fri, 4 Oct 2019 20:53:58 +0200 Subject: [PATCH] fixed issue 33 --- NyaaPy/pantsu.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/NyaaPy/pantsu.py b/NyaaPy/pantsu.py index 2446db0..4bdccc8 100644 --- a/NyaaPy/pantsu.py +++ b/NyaaPy/pantsu.py @@ -8,6 +8,14 @@ class Pantsu: def __init__(self): self.BASE_URL = "https://nyaa.pantsu.cat/api" + + def last_uploads(self, number_of_results): + r = requests.get(self.URI) + soup = BeautifulSoup(r.text, 'html.parser') + rows = soup.select('table tr') + + return utils.parse_nyaa(rows, limit=number_of_results + 1) + # Torrents - GET def search(self, keyword, **kwargs):