mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-03 17:39:42 +02:00
refactor: remove duplicate stripping
This commit is contained in:
@@ -10,15 +10,12 @@ def scrape_uztracker(query):
|
||||
posts = []
|
||||
|
||||
try:
|
||||
response = requests.get(
|
||||
f"{search_url.rstrip('/')}/tracker.php",
|
||||
params={'nm': query},
|
||||
)
|
||||
response = requests.get(search_url)
|
||||
response.raise_for_status()
|
||||
soup = BeautifulSoup(response.text, 'html.parser')
|
||||
links = soup.find_all('tr', class_="tCenter hl-tr", id=lambda x: x and x.startswith('tor_'))
|
||||
for link in links:
|
||||
|
||||
|
||||
theme_link = link.find('a', class_="genmed tLink", href=lambda x: x and x.startswith('./viewtopic'))
|
||||
url = urljoin(base_url, theme_link['href'])
|
||||
title = theme_link.b.text
|
||||
|
||||
Reference in New Issue
Block a user