Skip to content

Review if there are sites that use protobuf binaries instead of JSON #466

@mazz3rr

Description

@mazz3rr

Then, they can be also scraped via API requests bypassing the soup.

Football stats site example: https://superscore.live/en/football/piast-gliwice-wisla-plock/jnayrw86-zuw594te/lineups#match_id=4ZmpXyCptxdsyzoMFSvvjB

headers = {
    "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:147.0) Gecko/20100101 Firefox/147.0",
    "Accept": "application/protobuf",
    "Accept-Language": "en-US,en;q=0.9",
    "Accept-Encoding": "gzip, deflate, br, zstd",
    "Referer": "https://superscore.live/",
    "Origin": "https://superscore.live",
    # "Sec-GPC": "1",
    "Connection": "keep-alive",
    "Sec-Fetch-Dest": "empty",
    "Sec-Fetch-Mode": "cors",
    "Sec-Fetch-Site": "cross-site",
    # "If-Modified-Since": "Wed, 11 Feb 2026 18:28:15 GMT",
    "Priority": "u=4",
    "TE": "trailers",
}
url = "https://scorealarm-stats.freetls.fastly.net/v2/soccer/fixtures/lineups/plsuperscore/en-GB?fixture-id=4ZmpXyCptxdsyzoMFSvvjB"
r = fetch(url, headers=headers)
import blackboxprotobuf
decoded, message_type = blackboxprotobuf.decode_message(r.content)
# 'decoded' is a JSON-like dict

Metadata

Metadata

Assignees

Labels

supplementalNot involving code or documentation

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions