mirror of
https://github.com/sotam0316/docker-py-revanced.git
synced 2026-04-25 03:48:37 +09:00
🎨 Updated variable name
This commit is contained in:
@@ -14,14 +14,10 @@ from src.utils import (
|
||||
apkmirror_status_check,
|
||||
bs4_parser,
|
||||
handle_request_response,
|
||||
request_header,
|
||||
)
|
||||
|
||||
not_found_icon = "https://img.icons8.com/bubbles/500/android-os.png"
|
||||
headers = {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
|
||||
"AppleWebKit/537.36 (HTML, like Gecko)"
|
||||
" Chrome/96.0.4664.93 Safari/537.36"
|
||||
}
|
||||
|
||||
|
||||
def apkcombo_scrapper(package_name: str) -> str:
|
||||
@@ -29,7 +25,7 @@ def apkcombo_scrapper(package_name: str) -> str:
|
||||
try:
|
||||
apkcombo_url = f"https://apkcombo.com/genericApp/{package_name}"
|
||||
r = requests.get(
|
||||
apkcombo_url, headers=headers, allow_redirects=True, timeout=10
|
||||
apkcombo_url, headers=request_header, allow_redirects=True, timeout=10
|
||||
)
|
||||
soup = BeautifulSoup(r.text, bs4_parser)
|
||||
url = soup.select_one("div.avatar > img")["data-src"]
|
||||
@@ -48,7 +44,7 @@ def apkmirror_scrapper(package_name: str) -> str:
|
||||
|
||||
|
||||
def _extracted_from_apkmirror_scrapper(search_url: str) -> str:
|
||||
r = requests.get(search_url, headers=headers, timeout=60)
|
||||
r = requests.get(search_url, headers=request_header, timeout=60)
|
||||
soup = BeautifulSoup(r.text, bs4_parser)
|
||||
sub_url = soup.select_one("div.bubble-wrap > img")["src"]
|
||||
new_width = 500
|
||||
|
||||
Reference in New Issue
Block a user