Skip to content

Releases: jdepoix/youtube-transcript-api

v1.2.4

29 Jan 09:07
505f412

Choose a tag to compare

What's Changed

  • When a WebshareProxyConfig is created with a proxy username containing the "-rotate" suffix, the suffix will no longer be appended twice by @cjkangme in #566
  • Fixed typo in README by @kiankyars in #551

New Contributors

Full Changelog: v1.2.3...v1.2.4

v1.2.3

13 Oct 15:55
b144075

Choose a tag to compare

What's Changed

  • Added support for python 3.14

Full Changelog: v1.2.2...v1.2.3

v1.2.2

04 Aug 12:21
63eeec2

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.2.1...v1.2.2

v1.2.1

22 Jul 16:18

Choose a tag to compare

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

v1.2.0

21 Jul 10:43
da6920b

Choose a tag to compare

What's Changed

  • [BREAKING] Removed the deprecated methods get_transcript, get_transcripts and list_transcripts. They have already been deprecated in v1.0.0, but I've kept them around to allow for an easier migration to v1.0.0. However, these methods have led to a lot of issues being created due to people initializing a YouTubeTranscriptApi object and passing a proxy config into the constructor, but then calling the deprecated static methods on that object. As these methods are static they don't/can't access the state set in the constructor, therefore, the proxy config is ignored.

Migration Guide

If you're still using get_transcript, get_transcripts you have to change your code as follows:

# old API
transcript = YouTubeTranscriptApi.get_transcript("abc")

# new API
ytt_api = YouTubeTranscriptApi()
transcript = ytt_api.fetch("abc").to_raw_data()

If you're still using list_transcripts you have to change your code as follows:

# old API
transcript_list = YouTubeTranscriptApi.list_transcripts("abc")

# new API
ytt_api = YouTubeTranscriptApi()
transcript_list = ytt_api.list("abc")

Full Changelog: v1.1.1...v1.2.0

v1.1.1

03 Jul 13:42
d2a409d

Choose a tag to compare

What's Changed

  • IpBlocked exception is now raised when the timedtext endpoint returns a status code 429 #468
  • fixed typo in README.md by @alx in #463

New Contributors

  • @alx made their first contribution in #463

Full Changelog: v1.1.0...v1.1.1

v1.1.0

11 Jun 22:29
b716e24

Choose a tag to compare

What's Changed

  • Refactored the way the captions json is retrieved from scraping it from the /watch html to fetching it from the innertube API
  • Added a new exception called PoTokenRequired, which will be raised if timedtext urls are encountered that require a PO token, such that we get feedback from users ASAP if this happens again

Breaking

  • Unfortunately, I haven't been able to implement authentication for the innertube API yet. As I wanted to provide a fix for this issue ASAP, I decided to disable cookie authentication for the time being.

Full Changelog: v1.0.3...v1.1.0

v1.0.3

25 Mar 18:12
b706276

Choose a tag to compare

What's Changed

  • Refactored parsing of the JS var containing the transcript data, to make it more robust to changes in the formatting of the returned HTML

Full Changelog: v1.0.2...v1.0.3

v1.0.2

17 Mar 18:17
dc08c3f

Choose a tag to compare

What's Changed

  • Added retry mechanism, which will retry requests when Webshare proxies are used and RequestBlocked is raised, to trigger an IP rotation in case a user encounters a blocked residential IP
  • Added new error messages when RequestBlocked is raised despite proxies being used, to assist users in figuring out what the issue is
  • Fixed PEP-8 warning by @afourney in #396

New Contributors

Full Changelog: v1.0.1...v1.0.2

v1.0.1

12 Mar 20:30
aad8621

Choose a tag to compare

What's Changed

  • Adds a feature to allow proxy configs to prevent the HTTP client from keeping TCP connections open, as keeping TCP connections alive can prevent proxy providers from rotating your IP
    • adds the prevent_keeping_connections_alive() -> bool method to ProxyConfig objects
    • When initializing YouTubeTranscriptApi a Connection: close header will be added to the HTTP client, if a proxy config with prevent_keeping_connections_alive() == True is used
  • Added py.typed by @jkawamoto in #390

New Contributors

Full Changelog: v1.0.0...v1.0.1