From 109dfb2d9d581cca7f332bf83a60c2761236082d Mon Sep 17 00:00:00 2001 From: Miguel Ros Date: Tue, 5 Jul 2022 11:57:42 +0200 Subject: [PATCH] split parse dom --- google_play_scraper/features/app.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/google_play_scraper/features/app.py b/google_play_scraper/features/app.py index d5d3ac3..d178437 100644 --- a/google_play_scraper/features/app.py +++ b/google_play_scraper/features/app.py @@ -16,7 +16,10 @@ def app(app_id: str, lang: str = "en", country: str = "us") -> Dict[str, Any]: except NotFoundError: url = Formats.Detail.fallback_build(app_id=app_id, lang=lang) dom = get(url) + return parse_dom(dom=dom, app_id=app_id, url=url) + +def parse_dom(dom: str, app_id: str, url: str) -> Dict[str, Any]: matches = Regex.SCRIPT.findall(dom) dataset = {}