0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-10-31 23:02:40 +00:00
Commit graph

21886 commits

Author SHA1 Message Date
Abdessamad Derraz
182a18eaa0 Revert "Reorder imports in hotmart.py"
This reverts commit e7f90d887d.
2023-07-22 07:39:53 +02:00
Abdessamad DERRAZ
e7f90d887d Reorder imports in hotmart.py
This commit reorders the imports in hotmart.py according to PEP8 guidelines for improved readability.
2023-07-22 02:13:09 +02:00
Abdessamad DERRAZ
bee20eeb82 Refactor HotmartIE tests to generate dynamic URL
This commit refactors the tests in the HotmartIE class to generate a dynamic URL for testing. Previously, the test URL was hardcoded and could expire, causing the tests to fail. Now, the test URL is generated dynamically by making a request to the Teachable API and constructing the URL from the response. This ensures that the test URL is always valid at the time of testing.
2023-07-22 02:04:45 +02:00
Abdessamad DERRAZ
c1b5121932 Update Teachable Extractor to Support Multiple Videos per Page
This commit updates the Teachable extractor function to support the extraction of multiple videos from a single page. Previously, the function only extracted the first video from a page. The updated function now iterates over all video elements on a page and extracts each one. This enhancement improves the functionality of the extractor and allows for more comprehensive scraping of Teachable content.
2023-07-22 00:31:20 +02:00
Abdessamad DERRAZ
7f44d0fa02 Refactoring HotmartIE Extractor for Code Convention Compliance
Implemented code convention compliance throughout the HotmartIE extractor. The adjustments span from syntax and structure to proper usage of utility functions. The changes encompass quote usage, inline value extraction, long lines management, import order, fallbacks collapsing, trailing parentheses placement, and the use of conversion and parsing functions like url_or_none and int_or_none for safer data handling.
2023-07-21 19:29:19 +02:00
Abdessamad DERRAZ
19cc97d1a1 Apply minor style corrections
This commit introduces a few minor style corrections that were previously overlooked. These corrections ensure that the code adheres to the project's style guidelines and improves overall readability. The changes are minor and do not affect the functionality of the code.
2023-07-21 11:43:27 +02:00
Abdessamad DERRAZ
f5fc4de7c9 Revert unnecessary style changes caused by Black
This commit reverts the unnecessary style changes that were introduced by the Black tool. While Black is useful for enforcing PEP 8 style guidelines, it had caused too many modifications in this case, leading to a loss of original code style and readability. This commit ensures that only the necessary style changes for PEP 8 compliance are kept, while the rest of the code remains as originally intended.
2023-07-21 11:35:35 +02:00
Abdessamad DERRAZ
a997e972a5 Fix flake8 E203 errors in teachable.py
This commit resolves the flake8 E203 errors in the teachable.py file. The errors were caused by unnecessary whitespace before colons on lines 210 and 386. The removal of these spaces ensures the code adheres to PEP 8 style guidelines, allowing flake8 to run without any errors.
2023-07-20 23:19:07 +02:00
Abdessamad DERRAZ
0dd98c888d Fix tests for teachable.py and hotmart.py
This commit addresses the failing tests in teachable.py and hotmart.py. The changes ensure that the tests pass by correctly handling the temporary URLs generated by these scripts.

Please note that the tests are dependent on the validity of these temporary URLs. Therefore, the tests will pass temporarily as long as the URLs are valid.

In addition, this commit adheres to the style guide by wrapping the code at 79 characters.
2023-07-20 23:14:06 +02:00
Abdessamad DERRAZ
378ecc6b65 Update Test URL in HotmartIE
The test URL in the HotmartIE class has been updated to match the format expected by _VALID_URL. This resolves a test error where the test URL did not match the expected format.
2023-07-20 20:06:48 +02:00
Abdessamad DERRAZ
fe8d9ec837 [extractor] Update Teachable and add Hotmart (Credit: Green0Photon)
This commit updates the Teachable extractor to handle Hotmart video URLs and adds a new extractor for Hotmart. The Hotmart extractor is used to handle videos from Hotmart, a platform for selling online courses. The changes allow yt-dlp to download videos from courses hosted on Hotmart.

The code for these changes was originally written by Green0Photon and can be found at https://github.com/Green0Photon/yt-dlp/tree/teachable-fix-add-hotmart. This commit is a direct implementation of his work into the main yt-dlp repository.

The changes have been tested and confirmed to work as expected. This commit also includes updates to the code style and formatting to match the yt-dlp contributing guidelines.
2023-07-20 19:31:22 +02:00
bashonly
65cfa2b057
[ie/MuseAI] Add extractor (#7614)
Closes #7543
Authored by: bashonly
2023-07-20 14:15:21 +00:00
bashonly
f4ea501551
[ie/MagellanTV] Add extractor (#7616)
Closes #7529
Authored by: bashonly
2023-07-20 14:02:50 +00:00
bashonly
af86873218
[utils] Improve parse_duration
Authored by: bashonly
2023-07-20 08:40:31 -05:00
bashonly
75dc8e673b
[networking] Fix --legacy-server-connect (#7645)
Bugfix for 227bf1a33b

Authored by: bashonly
2023-07-20 13:31:17 +00:00
bashonly
71baa490eb
[networking] Fix POST requests with zero-length payloads (#7648)
Bugfix for 227bf1a33b

Authored by: bashonly
2023-07-20 13:23:30 +00:00
bashonly
613dbce177
[ie/twitter:spaces] Fix format protocol (#7550)
Closes #7536
Authored by: bashonly
2023-07-15 21:10:12 +00:00
Văn Anh
bb5d84c9d2
[ie/facebook:reel] Fix extraction (#7564)
Closes #7469
Authored by: demon071, bashonly
2023-07-15 21:03:23 +00:00
zhong-yiyu
1d3d579c21
[ie/pornhub] Update access cookies for UK (#7591)
Closes #7590
Authored by: zhong-yiyu
2023-07-15 20:54:19 +00:00
bashonly
42ded0a429
[fd/external] Fixes to cookie handling
- Fix bug in `axel` Cookie header arg
- Pass cookies to `curl` as strings
- Write session cookies for `aria2c` and `wget`

Closes #7539
Authored by: bashonly
2023-07-15 15:25:51 -05:00
bashonly
6c5211cebe
[core] Fix HTTP headers and cookie handling
- Remove `Cookie` header from `http_headers` immediately after loading into cookiejar
- Restore compat for `--load-info-json` cookies
- Add more tests
- Fix improper passing of Cookie header by `MailRu` extractor

Closes #7558
Authored by: bashonly, pukkandan
2023-07-15 15:25:45 -05:00
Aaruni Kaushik
2b029ca0a9
[cleanup] Add color to download-archive message (#5138)
Authored by: aaruni96, Grub4K, pukkandan
Closes #4913
2023-07-16 00:45:08 +05:30
pukkandan
131d132da5
[build] Make sure deprecated modules are added 2023-07-15 16:47:55 +05:30
coletdjnz
3d2623a898
[compat, networking] Deprecate old functions (#2861)
Authored by: coletdjnz, pukkandan
2023-07-15 16:18:35 +05:30
coletdjnz
227bf1a33b
[networking] Rewrite architecture (#2861)
New networking interface consists of a `RequestDirector` that directs
each `Request` to appropriate `RequestHandler` and returns the
`Response` or raises `RequestError`. The handlers define adapters to
transform its internal Request/Response/Errors to our interfaces.

User-facing changes:
- Fix issues with per request proxies on redirects for urllib
- Support for `ALL_PROXY` environment variable for proxy setting
- Support for `socks5h` proxy
   - Closes https://github.com/yt-dlp/yt-dlp/issues/6325, https://github.com/ytdl-org/youtube-dl/issues/22618, https://github.com/ytdl-org/youtube-dl/pull/28093
- Raise error when using `https` proxy instead of silently converting it to `http`

Authored by: coletdjnz
2023-07-15 16:18:35 +05:30
pukkandan
c365dba843
[networking] Add module (#2861)
No actual changes - code is only moved around
2023-07-15 16:18:34 +05:30
pukkandan
1b392f905d
[utils] Add temporary shim for logging
Related: #5680, #7517
2023-07-15 16:18:34 +05:30
coletdjnz
1ba6fe9db5
[ie/youtube:tab] Detect looping feeds (#6621)
Closes https://github.com/yt-dlp/yt-dlp/issues/5555

Note: the first page may still be repeated, however this is better than nothing.

Authored by: coletdjnz
2023-07-15 03:20:24 +00:00
Finn R. Gärtner
1bcb9fe871
[ie/piapro] Support /content URL (#7592)
Authored by: FinnRG
2023-07-14 23:39:02 +05:30
Neurognostic
8a4cd12c8f
[pp/EmbedThumbnail] Support m4v (#7583)
Authored by: Neurognostic
2023-07-14 02:09:21 +05:30
Aleri Kaisattera
2cfe221fbb
[ie/streamanity] Remove (#7571)
Service is dead
Authored by: alerikaisattera
2023-07-13 19:47:05 +05:30
Mahmoud Abdel-Fattah
2af4eeb772
[utils] clean_podcast_url: Handle more trackers (#7556)
Authored by: mabdelfattah, bashonly
Closes #7544
2023-07-11 06:30:38 +05:30
Zprokkel
325191d0c9
[ie/vrt] Update token signing key (#7519)
Authored by: Zprokkel
2023-07-10 13:15:47 +00:00
GD-Slime
bdd0b75e3f
[ie/BiliBiliBangumi] Fix extractors (#7337)
- Overhaul BiliBiliBangumi extractor for the site's new API
- Add BiliBiliBangumiSeason extractor
- Refactor BiliBiliBangumiMedia extractor

Closes #6701, Closes #7400
Authored by: GD-Slime
2023-07-08 22:26:03 +00:00
bashonly
92315c0377
[extractor/twitter] Fix GraphQL and legacy API (#7516)
Authored by: bashonly
2023-07-06 19:39:51 +00:00
pukkandan
b03fa78345
Revert 49296437a8 2023-07-06 14:19:32 -05:00
github-actions
cc0619f62d Release 2023.07.06
Created by: pukkandan

:ci skip all :ci run dl
2023-07-06 18:57:59 +00:00
pukkandan
b532a34810
[docs] Minor fixes
Closes #7515
2023-07-06 23:32:19 +05:30
Simon Sawicki
3121512228
[core] Change how Cookie headers are handled
Cookies are now saved and loaded under `cookies` key in the info dict
instead of `http_headers.Cookie`. Cookies passed in headers are
auto-scoped to the input URLs with a warning.

Ref: https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-v8mc-9377-rwjj

Authored by: Grub4K
2023-07-06 23:14:39 +05:30
coletdjnz
f8b4bcc0a7
[core] Prevent Cookie leaks on HTTP redirect
Ref: https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-v8mc-9377-rwjj

Authored by: coletdjnz
2023-07-06 23:14:39 +05:30
bashonly
1ceb657bdd
[fd/external] Scope cookies
- ffmpeg: Calculate cookies from cookiejar and pass with `-cookies` arg instead of `-headers`
- aria2c, curl, wget: Write cookiejar to file and use external FD built-in cookiejar support
- httpie: Calculate cookies from cookiejar instead of `http_headers`
- axel: Calculate cookies from cookiejar and disable http redirection if cookies are passed
    - May break redirects, but axel simply don't have proper cookie support

Ref: https://github.com/yt-dlp/yt-dlp/security/advisories/GHSA-v8mc-9377-rwjj

Authored by: bashonly, coletdjnz
2023-07-06 23:14:38 +05:30
pukkandan
ad8902f616
[ie/vidlii] Handle relative URLs
Closes #7480
2023-07-06 21:40:09 +05:30
pukkandan
94ed638a43
[ie/youtube] Avoid false DRM detection (#7396)
Some master manifests contain a mix of DRM and non-DRM formats
2023-07-06 21:40:07 +05:30
pukkandan
bc344cd456
[core] Allow extractors to mark formats as potentially DRM (#7396)
This is useful for HLS where detecting whether the format is
actually DRM requires the child manifest to be downloaded.

Makes the error message when using `--test` inconsistent,
but doesn't really matter.
2023-07-06 21:40:01 +05:30
pukkandan
906c0bdcd8
[formats] Fix best fallback for storyboards
Partial fix for #7478
2023-07-06 21:39:58 +05:30
pukkandan
337734d4a8
[cleanup] Misc 2023-07-06 21:39:55 +05:30
pukkandan
fa44802809
[devscripts/make_changelog] Skip reverted commits 2023-07-06 20:22:04 +05:30
pukkandan
47bcd43724
[outtmpl] Pad playlist_index etc even when with internal formatting
Closes #7501
2023-07-06 20:22:03 +05:30
pukkandan
662ef1e910
[downloader/http] Avoid infinite loop when no data is received
Closes #7504
2023-07-06 20:22:00 +05:30
Jorge
6355b5f1e1
[misc] Add CodeQL workflow (#7497) 2023-07-06 20:21:46 +05:30