Commit Graph

216 Commits

Author SHA1 Message Date
TiA4f8R accd5ddef3
Adress requested changes in YoutubeStreamExtractor 2021-08-01 12:38:58 +02:00
TiA4f8R 8c1c7281b0
Real fix of the fetch of the JS player at each the signatureTimestamp is required
The strings playerJsUrl, sts and playerCode are now static in order to don't fetch again the JavaScript player at each time the signatureTimestamp is needed.
2021-08-01 12:38:43 +02:00
TiA4f8R a59c2a3577
Catch every exception instead of only IOException and ExtractionException and add a Javadoc
Catch every exception instead of only IOException and ExtractionException.
Add JavaDoc for fetchAndroidMobileJsonPlayer method of YoutubeStreamExtractor
2021-08-01 12:38:42 +02:00
TiA4f8R 6921e80ded
Try again to don't fetch at each time the JavaScript player 2021-08-01 12:38:42 +02:00
TiA4f8R 318bc46a8c
Readd the deleted code of views because watching count of livestreams was broken
The number shown was the total number of views that a livestream has. In order to fix this bug, the previous code is readded.
2021-08-01 12:38:39 +02:00
TiA4f8R 947baec805
Fetch again the desktop player JSON only if the content is protected by signatureCiphers 2021-08-01 12:38:39 +02:00
TiA4f8R b52732a1c3
Fix the fetch of the playerCode at each time getStsFromPlayerJs is called
storePlayerJs was called even if sts was not empty in the getStsFromPlayerJs method. This commit fixes it.
2021-08-01 12:38:37 +02:00
TiA4f8R 013b902535
Use the Android mobile API when there are OTF streams or the content is protected by signatureCiphers
Use the Android mobile API to get the itag 22 (720p with audio), removed when the content is protected by signatureCiphers.
Also use this API when they are OTF streams, to get the itag 17 and 36, low 3GPP quality streams but also the itag 139.
Update the web client version.
2021-08-01 12:38:36 +02:00
TiA4f8R e7d589edbf
Use the youtubei API for YouTube videos + update client version
Update the hardcoded client version to 2.20210520.09.00
Use the player and next endpoints of the Innertube API for YouTube videos
2021-08-01 12:38:36 +02:00
TiA4f8R b49ae547a3
Do some improvements to YoutubeStreamExtractor
Get the real name of the uploader (for autogenerated channels and music artist channels), like before the migration to the JSON pbj.
Do some other improvements, especially reformatting some code to be in the 100 characters line limit and use final where possible.
2021-08-01 12:38:01 +02:00
Tobi 394c02ad06
Merge pull request #683 from XiangRongLin/yt_throttling
[YouTube] Fix buffering by decoding n parameter of stream urls
2021-07-28 18:01:57 +02:00
TiA4f8R d13f531b6f Use YoutubeThrottlingDecrypter also in getAudioStreams and getVideoOnlyStreams methods of YoutubeStreamExtractor
Without this commit, the n param is only decrypted for streams extracted in getVideoStreams (so only for streams in the formats object of the player response).
2021-07-27 17:28:32 +02:00
XiangRongLin 3a3d1d7f2b Make YoutubeJavaScriptExtractor and JavaScript methods static
Also address review and rewrite some comments
2021-07-20 20:48:11 +02:00
XiangRongLin a683c8d278 Delete duplicated code to load youtube javascript file 2021-07-17 19:14:57 +02:00
XiangRongLin a02ee2e952 Rewrite youtube throttling solution and add tests 2021-07-17 19:10:09 +02:00
litetex ecf4232ce3 Using ``Collections.emptyList()`` 2021-07-17 16:41:12 +02:00
litetex 17ccaf4b87 Update YoutubeStreamExtractor.java
To fix ``java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String[] java.lang.String.split(java.lang.String)' on a null object reference``
2021-07-17 16:41:10 +02:00
XiangRongLin 6956b72af7 Fix YoutubeThrottlingDecoder.replaceNParam
Previously it replaced the parameter itself not the value of the parameter.
2021-07-17 10:05:14 +02:00
XiangRongLin a189f685dc cache player js code 2021-07-16 19:20:40 +02:00
XiangRongLin fcdb9bdbeb add url to sout 2021-07-15 20:05:26 +02:00
XiangRongLin 80cf8b3acd Extract separate YoutubeThrottlingDecoder 2021-07-15 20:05:25 +02:00
XiangRongLin a86a30103f [Youtube] bare bones version to solve throttling
Done by transforming the parameter "n" from videoplayback urls
https://github.com/ytdl-org/youtube-dl/issues/29326#issuecomment-865985377
2021-07-15 20:05:25 +02:00
bopol b475f09ba7 don't do useless concatenation 2021-06-23 20:33:32 +02:00
bopol e9a992b0a9 [youtube] Fix extraction of age restricted videos 2021-06-23 12:06:02 +02:00
Hassan Igbaria e8b5364745
Update YoutubeStreamExtractor.java 2021-05-21 16:22:24 +03:00
Fynn Godau 14f6f1b7c3 Generify related streams calls and rename method 2021-03-31 20:24:40 +02:00
bopol 8806fb4e6b
address reviews 2021-03-19 10:14:43 +01:00
bopol c47cc54908
Extract metadata for YouTube, SoundCloud & MediaCCC 2021-03-19 10:14:43 +01:00
TiA4f8R e55284bb8f
Code style improvements
Use final where possible in YoutubeStreamExtractor and do some other code style improvements
2021-03-05 16:38:53 +01:00
TobiGr d0a1041afd
Prevent NullPointerException and use equalsIgnorecase 2021-03-05 16:38:52 +01:00
TiA4f8R 890cbba625
Update PaidContent exception 2021-03-05 16:38:51 +01:00
TobiGr da3cfa967d
Handle age-restricted videos 2021-03-05 16:38:50 +01:00
TiA4f8R 448b68700c
Use final in exceptions and add AgeRestrictedException
AgeRestrictedException will be thrown only if the reason message equals to "Sign in to confirm your age" and if the age limit is 18.
2021-03-05 16:38:49 +01:00
TiA4f8R 59d6d3f04e
Fix YouTube tests 2021-03-05 16:38:42 +01:00
TiA4f8R 771bb1a2cb
Add three new exceptions for unavailable YouTube contents
These exceptions are thrown on a test with the error messages text, because YouTube returns only "UNPLAYABLE" status in most error cases.
Tests are based with English strings, so changing the lang used by
extractor will throw the generic exception (ContentNotAvailableException).
2021-03-05 16:38:39 +01:00
FireMasterK 5333d8a98b
Add more data. 2021-02-19 00:55:03 +05:30
bopol 1a322ad8ed Add uploader verified by service extraction 2021-02-18 16:36:40 +01:00
FireMasterK 5b70645d85 Add data to muxed streams aswell. 2021-02-18 20:16:53 +05:30
FireMasterK f31b2a68fd use getters/setters. 2021-02-18 20:16:53 +05:30
FireMasterK a7c9905183 Fix requested changes. 2021-02-18 20:16:52 +05:30
FireMasterK d1054338d3 Fix error with livestreams. 2021-02-18 20:16:52 +05:30
FireMasterK 11eb4932f4 Add data to respective classes. 2021-02-18 20:16:52 +05:30
FireMasterK e844d2aed3 Add dash fields to the ItagItem. 2021-02-18 20:16:52 +05:30
bopol 557934cb17 use EMPTY_STRING 2021-02-15 18:51:46 +01:00
bopol a931e31239 fix tests 2021-02-12 22:36:18 +01:00
TiA4f8R 1414a6f178
Fix extraction of YouTube chapters (#531)
YouTube changed the name of the chapters in the JSON from engagement-panel-macro-markers to engagement-panel-macro-markers-description-chapters, so extracting chapters doesn't work.
2021-02-03 22:07:34 +01:00
vkay94 11dcfe638b Add durationPerFrame to Frameset and getFrameBoundsAt method 2021-01-14 20:01:06 +01:00
TiA4f8R d30caeb091
Fix YouTube player JavaScript URL redirection 2020-12-27 15:55:03 +01:00
TobiGr bc6de14952 Extract stream and search meta info for YouTube
Add method to extract Google webcache URLs.
2020-12-22 18:19:26 +01:00
Tobias Groza 22a415156f
Merge pull request #479 from vkay94/stream-segments
Extract stream segments for YouTube
2020-12-19 11:12:22 +01:00