mirror of
https://github.com/SinTan1729/ReVancedBuilder.git
synced 2024-12-25 20:28:37 -06:00
chg: Use cloudscraper to get around cloudflare blocks
This commit is contained in:
parent
336b6470ca
commit
6cbe6454a3
2 changed files with 4 additions and 6 deletions
|
@ -11,8 +11,8 @@ requires-python = ">=3.6"
|
|||
keywords = ["revanced", "patch"]
|
||||
license = { file = "LICENSE" }
|
||||
classifiers = ["Programming Language :: Python :: 3"]
|
||||
dependencies = ["requests", "packaging", "bs4"]
|
||||
version = "1.1"
|
||||
dependencies = ["cloudscraper", "packaging", "bs4"]
|
||||
version = "1.2"
|
||||
|
||||
[project.scripts]
|
||||
ReVancedBuilder = "ReVancedBuilder:ReVancedBuilder"
|
||||
|
|
|
@ -8,7 +8,7 @@ import sys
|
|||
import json
|
||||
|
||||
from packaging.version import Version
|
||||
import requests as req
|
||||
import cloudscraper as scraper
|
||||
from bs4 import BeautifulSoup as bs
|
||||
|
||||
from ReVancedBuilder.Cleanup import err_exit
|
||||
|
@ -99,9 +99,7 @@ def get_apks(appstate):
|
|||
except req.exceptions.RequestException as e:
|
||||
err_exit(f"Error fetching patches, {e}", appstate)
|
||||
|
||||
session = req.Session()
|
||||
session.headers.update(
|
||||
{'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36'})
|
||||
session = scraper.create_scraper()
|
||||
|
||||
for app in build_config:
|
||||
# Check if we need to build an app
|
||||
|
|
Loading…
Reference in a new issue