mirror of
https://github.com/sotam0316/docker-py-revanced.git
synced 2026-04-25 03:48:37 +09:00
🧹 Cleanup
This commit is contained in:
@@ -6,10 +6,10 @@ from loguru import logger
|
|||||||
|
|
||||||
from src.config import RevancedConfig
|
from src.config import RevancedConfig
|
||||||
from src.downloader.factory import DownloaderFactory
|
from src.downloader.factory import DownloaderFactory
|
||||||
from src.exceptions import PatchingFailed
|
from src.exceptions import AppNotFound, PatchesJsonFailed, PatchingFailed
|
||||||
from src.parser import Parser
|
from src.parser import Parser
|
||||||
from src.patches import Patches
|
from src.patches import Patches
|
||||||
from src.utils import AppNotFound, PatchesJsonFailed, check_java, extra_downloads
|
from src.utils import check_java, extra_downloads
|
||||||
|
|
||||||
|
|
||||||
def main() -> None:
|
def main() -> None:
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ from loguru import logger
|
|||||||
from selectolax.lexbor import LexborHTMLParser
|
from selectolax.lexbor import LexborHTMLParser
|
||||||
|
|
||||||
from src.downloader.download import Downloader
|
from src.downloader.download import Downloader
|
||||||
from src.utils import AppNotFound
|
from src.exceptions import AppNotFound
|
||||||
|
|
||||||
|
|
||||||
class ApkMirror(Downloader):
|
class ApkMirror(Downloader):
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ from typing import Any
|
|||||||
from loguru import logger
|
from loguru import logger
|
||||||
|
|
||||||
from src.downloader.download import Downloader
|
from src.downloader.download import Downloader
|
||||||
from src.utils import AppNotFound
|
from src.exceptions import AppNotFound
|
||||||
|
|
||||||
|
|
||||||
class ApkPure(Downloader):
|
class ApkPure(Downloader):
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ from loguru import logger
|
|||||||
from selectolax.lexbor import LexborHTMLParser
|
from selectolax.lexbor import LexborHTMLParser
|
||||||
|
|
||||||
from src.downloader.download import Downloader
|
from src.downloader.download import Downloader
|
||||||
from src.utils import AppNotFound
|
from src.exceptions import AppNotFound
|
||||||
|
|
||||||
|
|
||||||
class ApkSos(Downloader):
|
class ApkSos(Downloader):
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ from loguru import logger
|
|||||||
from selectolax.lexbor import LexborHTMLParser
|
from selectolax.lexbor import LexborHTMLParser
|
||||||
|
|
||||||
from src.downloader.download import Downloader
|
from src.downloader.download import Downloader
|
||||||
from src.utils import AppNotFound
|
from src.exceptions import AppNotFound
|
||||||
|
|
||||||
|
|
||||||
class UptoDown(Downloader):
|
class UptoDown(Downloader):
|
||||||
|
|||||||
+12
-6
@@ -4,13 +4,19 @@ class APKMirrorScrapperFailure(Exception):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class ExtraAssetsFailure(Exception):
|
|
||||||
"""Failed to scrap icon from apkmirror."""
|
|
||||||
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class PatchingFailed(Exception):
|
class PatchingFailed(Exception):
|
||||||
"""Patching Failed."""
|
"""Patching Failed."""
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class AppNotFound(ValueError):
|
||||||
|
"""Not a valid Revanced App."""
|
||||||
|
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class PatchesJsonFailed(ValueError):
|
||||||
|
"""Patches failed."""
|
||||||
|
|
||||||
|
pass
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ from loguru import logger
|
|||||||
|
|
||||||
from src.app import APP
|
from src.app import APP
|
||||||
from src.config import RevancedConfig
|
from src.config import RevancedConfig
|
||||||
from src.utils import AppNotFound, PatchesJsonFailed
|
from src.exceptions import AppNotFound, PatchesJsonFailed
|
||||||
|
|
||||||
|
|
||||||
class Patches(object):
|
class Patches(object):
|
||||||
|
|||||||
@@ -38,18 +38,6 @@ def update_changelog(name: str, response: Dict[str, str]) -> None:
|
|||||||
file1.write(change_log)
|
file1.write(change_log)
|
||||||
|
|
||||||
|
|
||||||
class AppNotFound(ValueError):
|
|
||||||
"""Not a valid Revanced App."""
|
|
||||||
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class PatchesJsonFailed(ValueError):
|
|
||||||
"""Patches failed."""
|
|
||||||
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def handle_response(response: Response) -> None:
|
def handle_response(response: Response) -> None:
|
||||||
"""Handle Get Request Response."""
|
"""Handle Get Request Response."""
|
||||||
response_code = response.status_code
|
response_code = response.status_code
|
||||||
|
|||||||
Reference in New Issue
Block a user