mirror of
https://github.com/sotam0316/docker-py-revanced.git
synced 2026-04-25 03:48:37 +09:00
✨ Added microg
This commit is contained in:
@@ -20,6 +20,7 @@ session = Session()
|
|||||||
session.headers["User-Agent"] = "anything"
|
session.headers["User-Agent"] = "anything"
|
||||||
apps = ["youtube", "youtube-music", "twitter", "reddit", "tiktok", "warnwetter"]
|
apps = ["youtube", "youtube-music", "twitter", "reddit", "tiktok", "warnwetter"]
|
||||||
apk_mirror = "https://www.apkmirror.com"
|
apk_mirror = "https://www.apkmirror.com"
|
||||||
|
github = "https://www.github.com"
|
||||||
apk_mirror_urls = {
|
apk_mirror_urls = {
|
||||||
"reddit": f"{apk_mirror}/apk/redditinc/reddit/",
|
"reddit": f"{apk_mirror}/apk/redditinc/reddit/",
|
||||||
"twitter": f"{apk_mirror}/apk/twitter-inc/twitter/",
|
"twitter": f"{apk_mirror}/apk/twitter-inc/twitter/",
|
||||||
@@ -121,17 +122,19 @@ class Downloader:
|
|||||||
return version
|
return version
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def repository(cls, name: str) -> None:
|
def repository(
|
||||||
|
cls,
|
||||||
|
name: str,
|
||||||
|
owner: str = "revanced",
|
||||||
|
) -> None:
|
||||||
logger.debug(f"Trying to download {name} from github")
|
logger.debug(f"Trying to download {name} from github")
|
||||||
resp = session.get(
|
resp = session.get(f"{github}/{owner}/{name}/releases/latest")
|
||||||
f"https://github.com/revanced/revanced-{name}/releases/latest"
|
|
||||||
)
|
|
||||||
parser = LexborHTMLParser(resp.text)
|
parser = LexborHTMLParser(resp.text)
|
||||||
url = parser.css("li.Box-row > div:nth-child(1) > a:nth-child(2)")[:-2][
|
url = parser.css("li.Box-row > div:nth-child(1) > a:nth-child(2)")[:-2][
|
||||||
-1
|
-1
|
||||||
].attributes["href"]
|
].attributes["href"]
|
||||||
extension = url.rfind(".")
|
extension = url.rfind(".")
|
||||||
cls._download("https://github.com" + url, name + url[extension:])
|
cls._download(github + url, name + url[extension:])
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def report(cls) -> None:
|
def report(cls) -> None:
|
||||||
@@ -305,6 +308,7 @@ def main() -> None:
|
|||||||
downloader.repository("cli")
|
downloader.repository("cli")
|
||||||
downloader.repository("integrations")
|
downloader.repository("integrations")
|
||||||
downloader.repository("patches")
|
downloader.repository("patches")
|
||||||
|
downloader.repository("VancedMicroG", "TeamVanced")
|
||||||
|
|
||||||
def get_patches() -> None:
|
def get_patches() -> None:
|
||||||
logger.debug(f"Excluding patches for app {app}")
|
logger.debug(f"Excluding patches for app {app}")
|
||||||
|
|||||||
Reference in New Issue
Block a user