Commit Graph

99 Commits

Author SHA1 Message Date
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
Jonas Depoix 72f035fa6d adjusted CLI to be able to handle masked hyphens 2021-03-15 10:34:05 +01:00
Chris Howell 35dca89ef2 add object to classes, fixes bugfix/ISSUE-75 2021-03-08 04:04:19 -08:00
Chris Howell baadc2f7f0 Merge master, fix readme conflicts 2021-03-02 07:48:17 -08:00
Your Name 23798f205d improve message as per jdepoix suggestion 2021-01-25 17:36:27 +01:00
Your Name dbf5eeafe6 Error message more descriptive 2021-01-22 14:18:56 +01:00
Your Name fb819c06e4 Fix test case name 2021-01-21 19:53:06 +01:00
Your Name 14c70359ba Fix "video not available" being shown to the user when when YouTube start asking for captcha resolution due to receiving too many requests from the same IP. Show instead an appropiate message.
To be able to keep making requests, the captcha must be solved in a browser and the browser cookie must be passed to youtube-transcript-api.
2021-01-21 19:43:29 +01:00
Chris Howell 138643a682 Merge branch 'master' into feature/ISSUE-23 2020-10-10 21:13:51 -07:00
Chris Howell 150c50cabe Fix since Python2.7 doesnt support encoding kwarg to open() 2020-10-08 14:29:26 -07:00
Chris Howell eb01e08b04 Add explicit utf-8 encoding for file I/O in test_api.py 2020-10-08 13:36:33 -07:00
Chris Howell 36f29c3058 Add a few initial test cases, could use more 2020-09-01 15:23:04 -07:00
Chris Howell f3dc6f508f Add new formatters.py module 2020-09-01 15:21:47 -07:00
Jonas Depoix bc2a90bef7 removed version dependent import from coverage 2020-08-31 14:07:35 +02:00
danielcliu 31b8f4a179 Redid errors for cookies, improved testing coverage 2020-01-30 21:53:18 -08:00