refactor: improve scraper handling by utilizing classes for registration

This commit is contained in:
Vxrtrauter
2026-03-20 02:22:40 +01:00
parent 325eda54fa
commit 2afb3e7716
17 changed files with 301 additions and 341 deletions
+18
View File
@@ -0,0 +1,18 @@
import requests
def scrape_buzzheavier(url):
response = requests.get(url)
response.raise_for_status()
download_url = url + '/download'
headers = {
'hx-current-url': url,
'hx-request': 'true',
'referer': url
}
head_response = requests.head(download_url, headers=headers, allow_redirects=False)
hx_redirect = head_response.headers.get('hx-redirect')
return hx_redirect