github jdepoix/youtube-transcript-api v1.2.1

latest release: v1.2.2
one month ago

What's Changed

  • Added the property filter_ip_locations to WebshareProxyConfig. This allows for limiting the pool of IPs that Webshare will be rotating through to those located in specific countries. By choosing locations that are close to the machine that is doing the requests, latency can be reduced. Also, this can be used to work around location-based restrictions.
    ytt_api = YouTubeTranscriptApi(
        proxy_config=WebshareProxyConfig(
            proxy_username="<proxy-username>",
            proxy_password="<proxy-password>",
            filter_ip_locations=["de", "us"],
        )
    )
    
    # Webshare will now only rotate through IPs located in Germany or the United States!
    ytt_api.fetch(video_id)
    The full list of available locations (and how many IPs are available in each location) can be found here.
  • [Fixes #483] Add __all__ to __init__.py to support mypy --strict usage by @Jer-Pha in #486

New Contributors

Full Changelog: v1.2.0...v1.2.1

Don't miss a new youtube-transcript-api release

NewReleases is sending notifications on new releases.