mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-04 17:59:43 +02:00
Update everything to work with new API + Reorganize file structurem functions and common logic
This commit is contained in:
@@ -6,10 +6,7 @@ def scrape_rutracker(search_text):
|
||||
search = requests.get(f"{state.api_url}/search/{search_text}")
|
||||
if search:
|
||||
try:
|
||||
data = search.json()
|
||||
resulttitles = data["titles"]
|
||||
resultlinks = data["links"]
|
||||
return resulttitles, resultlinks
|
||||
return search.text
|
||||
except Exception:
|
||||
if state.debug:
|
||||
print("No results found / No response from server")
|
||||
|
||||
Reference in New Issue
Block a user