INNER CODE UNIT · Python

save_links

pluwen/awesome-testflight-link · scripts/utils.py:54

def save_links(links):
    with open(LINKS_JSON, 'w', encoding='utf-8') as f:
        json.dump(links, f, indent=2, ensure_ascii=False)


def parse_platforms_from_string(s: str) -> list:
    """Parse comma-separated platform string into validated list."""
    if not s:
        return []
    parts = [p.strip().lower() for p in s.split(',') if p.strip()]
    return [p for p in parts if p in VALID_PLATFORMS]


def extract_app_name(html: str) -> str:
    app_name_search = APP_NAME_PATTERN.search(html)
    app_name_ch_search = APP_NAME_CH_PATTERN.search(html)
    if app_name_search:
        return app_name_search.group(1)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…