This repository has been archived by the owner on May 18, 2024. It is now read-only.
Nyaa scrapper not working (for me) fixed #480
jcarvalhoj
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello
Nyaa scraper was not working for me, so I change the code a little and now it is working, follow the code for the community
#plex_debrid-main\plex_debrid-main\scraper\services\nyaa.py
from base import *
from ui.ui_print import *
import releases
name = "nyaa"
def scrape(query, altquery):
anime_name = query
url = "https://nyaa.si/?f=0&c=0_0&q="+anime_name
response = requests.get(url)
soup = BeautifulSoup(response.content, "html.parser")
table = soup.find("table", {"class": "table table-bordered table-hover table-striped torrent-list"})
rows = table.find_all("tr")
pagination_info = soup.find(class_='pagination-page-info')
text = pagination_info.find(string=True)
total = regex.search(r'([0-9]+)(?= results)', text, regex.I).group()
total = int(total)
current = -1
Beta Was this translation helpful? Give feedback.
All reactions