mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-04 09:59:41 +02:00
accidentally included a pycache
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
from bs4 import BeautifulSoup
|
||||
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
|
||||
|
||||
if __name__ == "__main__":
|
||||
example = "https://buzzheavier.com/irzewxdjt5ah"
|
||||
download = scrape_buzzheavier("https://buzzheavier.com/irzewxdjt5ah")
|
||||
print(download)
|
||||
Reference in New Issue
Block a user