Skip to content

Localization

localization

Public localization constants for the Scrape.do Google Plugin

Attributes:

Name Type Description
GOOGLE_LANGUAGE_CODES FrozenSet[str]

ISO 639-1 language codes accepted by the hl parameter across Google Plugins (150+ entries)

GOOGLE_COUNTRY_CODES FrozenSet[str]

ISO 3166-1 alpha-2 country codes accepted by the gl parameter across Google Plugins (240+ entries)

GOOGLE_DOMAINS FrozenSet[str]

Regional google_domain values accepted across Google plugins (84 entries)

GOOGLE_LANGUAGE_RESTRICT_VALUES FrozenSet[str]

Strict language-restrict tokens accepted by the lr parameter on google/search. Format = lang_<lowercase-iso-639-1>. The Chinese variants use lang_zh-CN / lang_zh-TW (capital country segment)

Validation Policy
  • These are PUBLIC frozensets meant for opt-in client-side validation

  • The endpoint parameter models keep hl / gl / google_domain / lr as plain str and DO NOT validate against these sets at construction time

  • Scrape.do may add new codes server-side faster than this SDK can ship them

  • Use them in your own pre-flight checks if you want strong feedback for typos

Validation Policy Example
from scrape_do.plugins.google.models.localization import (
    GOOGLE_LANGUAGE_CODES
    )
assert "en" in GOOGLE_LANGUAGE_CODES
Source

Reconstructed from the official Localization Reference