mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-06 11:35:29 +00:00
change headers
This commit is contained in:
parent
5cabd1b973
commit
641563bb14
@ -11,10 +11,10 @@ from bs4 import BeautifulSoup
|
||||
def domain_version():
|
||||
|
||||
console.print("[green]Get rules ...")
|
||||
req_repo = requests.get("https://raw.githubusercontent.com/Ghost6446/Streaming_comunity_data/main/data.json", headers={'user-agent': get_headers()})
|
||||
req_repo = requests.get("https://raw.githubusercontent.com/Ghost6446/Streaming_comunity_data/main/data.json")
|
||||
|
||||
if req_repo.ok:
|
||||
site_req = requests.get(f"https://streamingcommunity.{req_repo.json()['domain']}/").text
|
||||
site_req = requests.get(f"https://streamingcommunity.{req_repo.json()['domain']}/", headers={'user-agent': get_headers()}).text
|
||||
soup = BeautifulSoup(site_req, "lxml")
|
||||
version = json.loads(soup.find("div", {"id": "app"}).get("data-page"))['version']
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user