Skip to content

fix(deps): update dependency youtube-transcript-api to v1 #2206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 12, 2025

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 15, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
youtube-transcript-api ^0.6.2 -> ^1.0.0 age adoption passing confidence

Release Notes

jdepoix/youtube-transcript-api (youtube-transcript-api)

v1.0.3

Compare Source

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: jdepoix/youtube-transcript-api@v1.0.2...v1.0.3

v1.0.2

Compare Source

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 https://github.com/jdepoix/youtube-transcript-api/pull/396

New Contributors

Full Changelog: jdepoix/youtube-transcript-api@v1.0.1...v1.0.2

v1.0.1

Compare Source

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 https://github.com/jdepoix/youtube-transcript-api/pull/390

New Contributors

Full Changelog: jdepoix/youtube-transcript-api@v1.0.0...v1.0.1

v1.0.0

Compare Source

What's Changed

  • Overhaul of the public API to move away from the static methods get_transcript, get_transcripts and list_transcripts
    • YouTubeTranscriptApi.get_transcript(video_id) is replaced with YouTubeTranscriptsApi().fetch(video_id)
    • YouTubeTranscriptApi.list_transcripts(video_id) is replaced with YouTubeTranscriptsApi().list(video_id)
    • There is no equivalent for YouTubeTranscriptApi.get_transcript in the new interface, as this doesn't provide any meaningful utility over just running [ytt_api.fetch(video_id) for video_id in video_ids]
    • By calling .fetch and .list on a YouTubeTranscript instance, we can share a HTTP session between all requests, which allows us to share cookies and reduces redundant requests, thereby saving bandwidth and proxy costs.
    • transcript.fetch() now returns a FetchedTranscript object instead of a list of dictionaries. This allows for adding metadata and utility methods to the returned object. You can still convert a FetchedTranscript object to the previously used format by calling fetched_transcript.to_raw_data().
    • You'll find more details on the updated API in the README. The old static methods can still be used, but have been deprecated and will be removed in a future version!
  • Added new exceptions types to make the cause of some common errors more clear and allow for catching/handling them
    • RequestBlocked is now raised if the request has been blocked by YouTube due to a blacklisted IP (which would previously raise TranscriptDisabled #​303)
    • AgeRestricted is raised if the video is age restricted and requires cookie authentication (#​111)
    • VideoUnplayable is raised if the video is unplayable for an unknown reason. When this happens the error message that YouTube would display on the WebPlayer is returned by the exception, which should make unknown errors more useful. (#​219)
  • Added type hierarchy to configure proxies, which can now be passed into the constructor of YouTubeTranscriptApi. All proxy configs are located in the new module youtube_transcript_api.proxies.
    • Generic HTTP/HTTPS/SOCKS proxy can be configured using the GenericProxyConfig class (similarly to how it was done before using the requests dict)
    • Added integration of the proxy provider Webshare, which allows for easily setting up rotating residential proxies using the WebshareProxyConfig
    • You'll find more details on the proxy config classes and how to use them in the README
  • Added the option to pass a HTTP session into the YouTubeTranscriptApi constructor
    • Allows for setting a path to CA_BUNDLE file (#​362, #​312)
    • Allows for setting custom headers (#​316)
    • Allows for sharing HTTP sessions between multiple instance of YouTubeTranscriptApi
  • Added type signatures to all interfaces

Contributors

Due to the rewrite of some interfaces I wasn't able to merge their PRs directly, but special thanks to the work done by @​crhowell in #​219 and by @​andre-c-andersen in #​337, as their PRs have been very useful in implementing the new exceptions types! 😊🙏

Full Changelog: jdepoix/youtube-transcript-api@v0.6.3...v1.0.0


Configuration

📅 Schedule: Branch creation - "every weekend" in timezone US/Eastern, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link

github-actions bot commented Apr 15, 2025

OpenAPI Changes

Show/hide No detectable change.

Unexpected changes? Ensure your branch is up-to-date with main (consider rebasing).

@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch from d7725a0 to bf196fd Compare April 15, 2025 20:00
Copy link

OpenAPI Changes

Show/hide No detectable change.

@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch from bf196fd to 463e50f Compare April 15, 2025 20:35
Copy link

OpenAPI Changes

Show/hide No detectable change.

@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch from 463e50f to 040e575 Compare April 16, 2025 00:45
Copy link

OpenAPI Changes

Show/hide No detectable change.

@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch from 040e575 to c88df48 Compare April 17, 2025 15:31
Copy link

OpenAPI Changes

Show/hide No detectable change.

@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch from c88df48 to 2831aa4 Compare April 22, 2025 19:22
Copy link

OpenAPI Changes

Show/hide No detectable change.

@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch from 2831aa4 to 0ec9431 Compare April 22, 2025 20:06
Copy link

OpenAPI Changes

Show/hide No detectable change.

@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch from 0ec9431 to dbb39d4 Compare April 25, 2025 16:33
Copy link

OpenAPI Changes

Show/hide No detectable change.

@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch from dbb39d4 to 89efa22 Compare April 25, 2025 18:36
Copy link

OpenAPI Changes

Show/hide No detectable change.

@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch from 89efa22 to 0d74dc0 Compare April 25, 2025 19:13
Copy link

OpenAPI Changes

Show/hide No detectable change.

@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch from 0d74dc0 to 7a9da5f Compare April 28, 2025 11:56
Copy link

OpenAPI Changes

Show/hide No detectable change.

@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch from 7a9da5f to f00ef41 Compare April 28, 2025 16:28
Copy link

OpenAPI Changes

Show/hide No detectable change.

@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch from f00ef41 to 95d8f3e Compare April 29, 2025 19:13
Copy link

OpenAPI Changes

Show/hide No detectable change.

@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch from 95d8f3e to a93a2d1 Compare April 29, 2025 19:51
Copy link

OpenAPI Changes

Show/hide No detectable change.

@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch from a93a2d1 to 5739c8d Compare May 1, 2025 20:34
Copy link

github-actions bot commented May 1, 2025

OpenAPI Changes

Show/hide No detectable change.

@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch from 5739c8d to 2bdb048 Compare May 2, 2025 16:07
@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch from d8629ac to 18bd5c2 Compare May 7, 2025 18:06
Copy link

github-actions bot commented May 7, 2025

OpenAPI Changes

Show/hide No detectable change.

@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch from 18bd5c2 to cb98cad Compare May 8, 2025 18:39
Copy link

github-actions bot commented May 8, 2025

OpenAPI Changes

Show/hide No detectable change.

@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch from cb98cad to 999ce7f Compare May 8, 2025 18:51
Copy link

github-actions bot commented May 8, 2025

OpenAPI Changes

Show/hide No detectable change.

@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch from 999ce7f to 100d87b Compare May 8, 2025 20:23
Copy link

github-actions bot commented May 8, 2025

OpenAPI Changes

Show/hide No detectable change.

@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch from 100d87b to 15a3383 Compare May 9, 2025 15:04
Copy link

github-actions bot commented May 9, 2025

OpenAPI Changes

Show/hide No detectable change.

@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch from 15a3383 to 6c578e6 Compare May 9, 2025 15:50
Copy link

github-actions bot commented May 9, 2025

OpenAPI Changes

Show/hide No detectable change.

@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch from 6c578e6 to 420a122 Compare May 9, 2025 16:04
Copy link

github-actions bot commented May 9, 2025

OpenAPI Changes

Show/hide No detectable change.

@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch from 420a122 to 5ece84b Compare May 9, 2025 17:09
Copy link

github-actions bot commented May 9, 2025

OpenAPI Changes

Show/hide No detectable change.

@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch 2 times, most recently from d592237 to 85a3dfd Compare May 9, 2025 19:19
@renovate renovate bot force-pushed the renovate/youtube-transcript-api-1.x branch from 85a3dfd to 9766934 Compare May 9, 2025 21:01
@shanbady shanbady merged commit 830694a into main May 12, 2025
13 checks passed
@shanbady shanbady deleted the renovate/youtube-transcript-api-1.x branch May 12, 2025 14:34
Copy link
Contributor Author

renovate bot commented May 12, 2025

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant