Made few tests
This commit is contained in:
@@ -46,13 +46,11 @@ class Nyaa:
|
||||
def get(self, id):
|
||||
r = requests.get("{}/view/{}".format(self.URI, id))
|
||||
r.raise_for_status()
|
||||
# ! Description not working TODO
|
||||
# with open("test.html", "w") as f:
|
||||
# f.write(r.text)
|
||||
|
||||
return utils.parse_single(request_text=r.text)
|
||||
|
||||
def get_user(self, username):
|
||||
r = requests.get("{}/user/{}".format(self.URI, username))
|
||||
soup = BeautifulSoup(r.text, 'html.parser')
|
||||
r.raise_for_status()
|
||||
|
||||
return utils.parse_nyaa(soup.select('table tr'), limit=None)
|
||||
return utils.parse_nyaa(request_text=r.text, limit=None)
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
import re
|
||||
from lxml import etree
|
||||
from pprint import pprint
|
||||
|
||||
|
||||
def nyaa_categories(b):
|
||||
|
||||
Reference in New Issue
Block a user