mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-24 02:27:52 -06:00
refactor: split scraper cli and platform scrapers
This commit is contained in:
1 parent
fbf7ae826d
commit
9af72a1ffb
14 files changed
+491
-377
No files matched your search
@@ -255,6 +255,10 @@ def platform_config(
|
||||
}
|
||||
|
||||
|
||||
def _fetch_with_headers(url: str, headers: dict[str, str] | None = None) -> bytes:
|
||||
return fetch_bytes(url, headers=headers)
|
||||
|
||||
|
||||
class Scraper(BaseScraper):
|
||||
"""Pak scraper for one frontend of the MinUI family."""
|
||||
|
||||
@@ -266,7 +270,7 @@ class Scraper(BaseScraper):
|
||||
url: str | None = None,
|
||||
fetch: Callable[[str, dict[str, str] | None], bytes] | None = None,
|
||||
) -> None:
|
||||
self._fetch = fetch or (lambda u, h=None: fetch_bytes(u, headers=h))
|
||||
self._fetch = fetch or _fetch_with_headers
|
||||
self.revision = ""
|
||||
if url is None:
|
||||
self.revision = fetch_branch_head(self.variant.repo, self.variant.branch)
|
||||
|
||||
Reference in new issue
Block a user