Commit Graph

113 Commits

Author SHA1 Message Date
vasiliadi 84a825a0b4 fix: possible XML bombs and other exploits by replacing xml.etree.ElementTree with defusedxml.ElementTree 2024-11-15 20:08:01 -06:00
Jonas Depoix 006edf9c91 commented test back in 2024-11-11 16:06:00 +01:00
Jonas Depoix 47eae6d8e0 temporary change to test coverage in CI 2024-11-11 15:38:14 +01:00
Jonas Depoix 339fc4bcfe commented test back in 2024-11-11 14:53:58 +01:00
Jonas Depoix 0967845a3d testing if coverall will fail build 2024-11-11 12:30:22 +01:00
Jonas Depoix d35cb58cce changed to use ruff format for formatting instead of black 2024-11-11 10:47:03 +01:00
Jonas Depoix b9d9f23897 added ruff linter 2024-09-26 18:05:23 +02:00
Jonas Depoix 5f96588ada added black formatter 2024-09-26 17:56:36 +02:00
Jonas Depoix 7ab2a9e4a5 added condition to initialize empty translation language list when translationLanugage key is missing 2023-12-27 12:47:25 +01:00
Jonas Depoix b4e9cfc35b all requests use a accept-language: en-us header now 2023-06-16 15:11:26 +02:00
Jonas Depoix a04a7010ed added error which is thrown if url is used as the video id 2023-04-17 15:34:46 +02:00
Jonas Depoix 8c62e5e276 _FORMATTING_TAGS is now a static property of _TranscriptParser; _get_html_regext is now private; removed preserve_formatting property of _TranscriptParser 2023-04-17 15:07:10 +02:00
E. Seiver ca93c48fa1 move preserve_formatting from init to fetch()
also remove from transcriptlist & transcriptlistfetcher
2023-04-13 12:46:24 -07:00
E. Seiver 79fd63d585 move _FORMATTING_TAGS inside _TranscriptParser 2023-04-13 12:27:34 -07:00
E. Seiver eda8ddb38f _html_regex static property of _TranscriptParser()
also rename TEXT_FORMATS -> FORMATTING TAGS
2023-04-12 14:29:19 -07:00
E. Seiver 72e9781528 add preserve_formatting to get_transcripts() + tests
also assertion tests for `get_transcripts()` updated to include `False` at the end for  new `preserve_formatting` param
2023-04-12 12:43:48 -07:00
E. Seiver 393a76ca6a add preserve_formatting docstrings 2023-04-11 16:37:06 -07:00
E. Seiver e88783d69e fix spacing 2023-03-15 18:49:35 -07:00
E. Seiver c1e5ce4ebb update tests and test doc
add (partially escaped) italics to test doc
add new test for `preserve_formatting=True`
2023-03-15 18:21:34 -07:00
E. Seiver c1a037c39c Propagate formatting up to user level 2023-03-15 18:20:16 -07:00
E. Seiver 1f1c8b249b
Add optional HTML formatting `_TranscriptParser`
Text formats in `TEXT_FORMATS` global variable
Defaults to False
2023-03-15 15:44:26 -07:00
Liam Sy 77f1405ca2 revised test comments 2022-10-25 11:08:52 -04:00
Liam Sy 88bab9e77c added more tests for SRTFormatter 2022-10-25 10:58:44 -04:00
Liam Sy a78f493386 added test cases for SRTFormmater 2022-10-20 17:56:49 -04:00
Liam Sy 68ca703ae0 updated WebVTT and SRT formatters 2022-10-20 17:25:31 -04:00
Liam Sy 3b2e6e253d
Merge branch 'jdepoix:master' into master 2022-10-20 15:19:30 -04:00
Liam Sy 69c5a46016 added class SRTFormatter 2022-10-02 20:39:15 -04:00
Maja b4ac0a17b7 removed comments 2022-06-01 12:13:52 -04:00
Maja 74d645adce removed ast import 2022-06-01 12:09:37 -04:00
Maja e884646c16 added error message to assert statement 2022-04-26 00:35:01 -04:00
Jonas Depoix c76ef0f38d Merge branch 'master' of https://github.com/jdepoix/youtube-transcript-api into bugfix/ISSUE-144 2022-03-30 17:16:11 +02:00
Jonas Depoix 02b91b0870 transcript language list is now properly escaped 2022-03-30 17:13:25 +02:00
Jonas Depoix 39cdc1c54c pip and setuptools are now specifically updated before building the project 2022-03-30 15:22:24 +02:00
jdepoix 161be4a422
Merge pull request #137 from xenova/master
Raise `TranscriptsDisabled` if 'playerCaptionsTracklistRenderer' is not found (Fixes #136)
2021-12-13 10:16:37 +01:00
Joshua Lochner b8dbc97549 Add additional test case for `TranscriptsDisabled` 2021-11-29 18:40:01 +02:00
Joshua Lochner bd8d8919b2 Raise `TranscriptsDisabled` if 'playerCaptionsTracklistRenderer' is not found (Fixes #136) 2021-11-29 18:25:14 +02:00
Scott Lin 5613b9ec6c fix: typo on formatter 'webvtt' 2021-11-25 12:02:24 +08:00
jdepoix 5657a48674
Merge pull request #132 from jdepoix/feature/ISSUE-131
added error message if YouTube requests fail
2021-11-08 11:00:46 +01:00
Jonas Depoix b12e67d903 fixed string formatting 2021-11-08 10:57:08 +01:00
Jonas Depoix c3f8dc0772 added error message if YouTube requests fail 2021-11-08 09:51:21 +01:00
Jonas Depoix 99dd9126fd improved readability of time conversion 2021-06-07 08:52:29 +02:00
esha71 6f4ab9decd
Update formatters.py
corrected hours calculation logic in class WebVTTFormatter  method _seconds_to_timestamp for transcripts with more than an hour length
2021-05-30 02:30:56 +05:30
Jonas Depoix 9251be8462 added ability to create consent cookie 2021-03-31 15:59:57 +02:00
Jonas Depoix e69759f6d6 fixed test 2021-03-22 19:04:10 +01:00
Jonas Depoix 3781907943 Merge branch 'master' into feature/ISSUE-23 2021-03-22 18:54:07 +01:00
jdepoix c3f0cfca45
Merge pull request #103 from jdepoix/bugfix/ISSUE-80
adjusted CLI to be able to handle masked hyphens
2021-03-17 16:23:09 +01:00
Jonas Depoix 2f592a37a2 removed string formatting which is not supported in older python versions 2021-03-15 18:13:34 +01:00
Jonas Depoix cf585e2175 refactored formatters to use format_transcript and format_transcripts 2021-03-15 17:57:44 +01:00
Jonas Depoix d314139329 added FormatterLoader 2021-03-15 17:16:20 +01:00
Jonas Depoix 71268dfad9 Merge branch 'feature/ISSUE-23' of https://github.com/crhowell/youtube-transcript-api into feature/ISSUE-23 2021-03-15 14:37:59 +01:00