mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-03-07 14:49:56 +00:00
Compare commits
7 Commits
2022.02.03
...
2022.02.04
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b761428226 | ||
|
|
c1653e9efb | ||
|
|
84bbc54599 | ||
|
|
1e5d87beee | ||
|
|
22219f2d1f | ||
|
|
5a13fdd225 | ||
|
|
af5c1c553e |
6
.github/ISSUE_TEMPLATE/1_broken_site.yml
vendored
6
.github/ISSUE_TEMPLATE/1_broken_site.yml
vendored
@@ -11,7 +11,7 @@ body:
|
|||||||
options:
|
options:
|
||||||
- label: I'm reporting a broken site
|
- label: I'm reporting a broken site
|
||||||
required: true
|
required: true
|
||||||
- label: I've verified that I'm running yt-dlp version **2022.02.03**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update))
|
- label: I've verified that I'm running yt-dlp version **2022.02.04**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update))
|
||||||
required: true
|
required: true
|
||||||
- label: I've checked that all provided URLs are alive and playable in a browser
|
- label: I've checked that all provided URLs are alive and playable in a browser
|
||||||
required: true
|
required: true
|
||||||
@@ -51,12 +51,12 @@ body:
|
|||||||
[debug] Portable config file: yt-dlp.conf
|
[debug] Portable config file: yt-dlp.conf
|
||||||
[debug] Portable config: ['-i']
|
[debug] Portable config: ['-i']
|
||||||
[debug] Encodings: locale cp1252, fs utf-8, stdout utf-8, stderr utf-8, pref cp1252
|
[debug] Encodings: locale cp1252, fs utf-8, stdout utf-8, stderr utf-8, pref cp1252
|
||||||
[debug] yt-dlp version 2022.02.03 (exe)
|
[debug] yt-dlp version 2022.02.04 (exe)
|
||||||
[debug] Python version 3.8.8 (CPython 64bit) - Windows-10-10.0.19041-SP0
|
[debug] Python version 3.8.8 (CPython 64bit) - Windows-10-10.0.19041-SP0
|
||||||
[debug] exe versions: ffmpeg 3.0.1, ffprobe 3.0.1
|
[debug] exe versions: ffmpeg 3.0.1, ffprobe 3.0.1
|
||||||
[debug] Optional libraries: Cryptodome, keyring, mutagen, sqlite, websockets
|
[debug] Optional libraries: Cryptodome, keyring, mutagen, sqlite, websockets
|
||||||
[debug] Proxy map: {}
|
[debug] Proxy map: {}
|
||||||
yt-dlp is up to date (2022.02.03)
|
yt-dlp is up to date (2022.02.04)
|
||||||
<more lines>
|
<more lines>
|
||||||
render: shell
|
render: shell
|
||||||
validations:
|
validations:
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ body:
|
|||||||
options:
|
options:
|
||||||
- label: I'm reporting a new site support request
|
- label: I'm reporting a new site support request
|
||||||
required: true
|
required: true
|
||||||
- label: I've verified that I'm running yt-dlp version **2022.02.03**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update))
|
- label: I've verified that I'm running yt-dlp version **2022.02.04**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update))
|
||||||
required: true
|
required: true
|
||||||
- label: I've checked that all provided URLs are alive and playable in a browser
|
- label: I've checked that all provided URLs are alive and playable in a browser
|
||||||
required: true
|
required: true
|
||||||
@@ -62,12 +62,12 @@ body:
|
|||||||
[debug] Portable config file: yt-dlp.conf
|
[debug] Portable config file: yt-dlp.conf
|
||||||
[debug] Portable config: ['-i']
|
[debug] Portable config: ['-i']
|
||||||
[debug] Encodings: locale cp1252, fs utf-8, stdout utf-8, stderr utf-8, pref cp1252
|
[debug] Encodings: locale cp1252, fs utf-8, stdout utf-8, stderr utf-8, pref cp1252
|
||||||
[debug] yt-dlp version 2022.02.03 (exe)
|
[debug] yt-dlp version 2022.02.04 (exe)
|
||||||
[debug] Python version 3.8.8 (CPython 64bit) - Windows-10-10.0.19041-SP0
|
[debug] Python version 3.8.8 (CPython 64bit) - Windows-10-10.0.19041-SP0
|
||||||
[debug] exe versions: ffmpeg 3.0.1, ffprobe 3.0.1
|
[debug] exe versions: ffmpeg 3.0.1, ffprobe 3.0.1
|
||||||
[debug] Optional libraries: Cryptodome, keyring, mutagen, sqlite, websockets
|
[debug] Optional libraries: Cryptodome, keyring, mutagen, sqlite, websockets
|
||||||
[debug] Proxy map: {}
|
[debug] Proxy map: {}
|
||||||
yt-dlp is up to date (2022.02.03)
|
yt-dlp is up to date (2022.02.04)
|
||||||
<more lines>
|
<more lines>
|
||||||
render: shell
|
render: shell
|
||||||
validations:
|
validations:
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ body:
|
|||||||
options:
|
options:
|
||||||
- label: I'm reporting a site feature request
|
- label: I'm reporting a site feature request
|
||||||
required: true
|
required: true
|
||||||
- label: I've verified that I'm running yt-dlp version **2022.02.03**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update))
|
- label: I've verified that I'm running yt-dlp version **2022.02.04**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update))
|
||||||
required: true
|
required: true
|
||||||
- label: I've checked that all provided URLs are alive and playable in a browser
|
- label: I've checked that all provided URLs are alive and playable in a browser
|
||||||
required: true
|
required: true
|
||||||
@@ -60,12 +60,12 @@ body:
|
|||||||
[debug] Portable config file: yt-dlp.conf
|
[debug] Portable config file: yt-dlp.conf
|
||||||
[debug] Portable config: ['-i']
|
[debug] Portable config: ['-i']
|
||||||
[debug] Encodings: locale cp1252, fs utf-8, stdout utf-8, stderr utf-8, pref cp1252
|
[debug] Encodings: locale cp1252, fs utf-8, stdout utf-8, stderr utf-8, pref cp1252
|
||||||
[debug] yt-dlp version 2022.02.03 (exe)
|
[debug] yt-dlp version 2022.02.04 (exe)
|
||||||
[debug] Python version 3.8.8 (CPython 64bit) - Windows-10-10.0.19041-SP0
|
[debug] Python version 3.8.8 (CPython 64bit) - Windows-10-10.0.19041-SP0
|
||||||
[debug] exe versions: ffmpeg 3.0.1, ffprobe 3.0.1
|
[debug] exe versions: ffmpeg 3.0.1, ffprobe 3.0.1
|
||||||
[debug] Optional libraries: Cryptodome, keyring, mutagen, sqlite, websockets
|
[debug] Optional libraries: Cryptodome, keyring, mutagen, sqlite, websockets
|
||||||
[debug] Proxy map: {}
|
[debug] Proxy map: {}
|
||||||
yt-dlp is up to date (2022.02.03)
|
yt-dlp is up to date (2022.02.04)
|
||||||
<more lines>
|
<more lines>
|
||||||
render: shell
|
render: shell
|
||||||
validations:
|
validations:
|
||||||
|
|||||||
6
.github/ISSUE_TEMPLATE/4_bug_report.yml
vendored
6
.github/ISSUE_TEMPLATE/4_bug_report.yml
vendored
@@ -11,7 +11,7 @@ body:
|
|||||||
options:
|
options:
|
||||||
- label: I'm reporting a bug unrelated to a specific site
|
- label: I'm reporting a bug unrelated to a specific site
|
||||||
required: true
|
required: true
|
||||||
- label: I've verified that I'm running yt-dlp version **2022.02.03**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update))
|
- label: I've verified that I'm running yt-dlp version **2022.02.04**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update))
|
||||||
required: true
|
required: true
|
||||||
- label: I've checked that all provided URLs are alive and playable in a browser
|
- label: I've checked that all provided URLs are alive and playable in a browser
|
||||||
required: true
|
required: true
|
||||||
@@ -45,12 +45,12 @@ body:
|
|||||||
[debug] Portable config file: yt-dlp.conf
|
[debug] Portable config file: yt-dlp.conf
|
||||||
[debug] Portable config: ['-i']
|
[debug] Portable config: ['-i']
|
||||||
[debug] Encodings: locale cp1252, fs utf-8, stdout utf-8, stderr utf-8, pref cp1252
|
[debug] Encodings: locale cp1252, fs utf-8, stdout utf-8, stderr utf-8, pref cp1252
|
||||||
[debug] yt-dlp version 2022.02.03 (exe)
|
[debug] yt-dlp version 2022.02.04 (exe)
|
||||||
[debug] Python version 3.8.8 (CPython 64bit) - Windows-10-10.0.19041-SP0
|
[debug] Python version 3.8.8 (CPython 64bit) - Windows-10-10.0.19041-SP0
|
||||||
[debug] exe versions: ffmpeg 3.0.1, ffprobe 3.0.1
|
[debug] exe versions: ffmpeg 3.0.1, ffprobe 3.0.1
|
||||||
[debug] Optional libraries: Cryptodome, keyring, mutagen, sqlite, websockets
|
[debug] Optional libraries: Cryptodome, keyring, mutagen, sqlite, websockets
|
||||||
[debug] Proxy map: {}
|
[debug] Proxy map: {}
|
||||||
yt-dlp is up to date (2022.02.03)
|
yt-dlp is up to date (2022.02.04)
|
||||||
<more lines>
|
<more lines>
|
||||||
render: shell
|
render: shell
|
||||||
validations:
|
validations:
|
||||||
|
|||||||
2
.github/ISSUE_TEMPLATE/5_feature_request.yml
vendored
2
.github/ISSUE_TEMPLATE/5_feature_request.yml
vendored
@@ -13,7 +13,7 @@ body:
|
|||||||
required: true
|
required: true
|
||||||
- label: I've looked through the [README](https://github.com/yt-dlp/yt-dlp#readme)
|
- label: I've looked through the [README](https://github.com/yt-dlp/yt-dlp#readme)
|
||||||
required: true
|
required: true
|
||||||
- label: I've verified that I'm running yt-dlp version **2022.02.03**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update))
|
- label: I've verified that I'm running yt-dlp version **2022.02.04**. ([update instructions](https://github.com/yt-dlp/yt-dlp#update))
|
||||||
required: true
|
required: true
|
||||||
- label: I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates
|
- label: I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates
|
||||||
required: true
|
required: true
|
||||||
|
|||||||
@@ -11,6 +11,14 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
|
### 2022.02.04
|
||||||
|
|
||||||
|
* [youtube:search] Fix extractor by [coletdjnz](https://github.com/coletdjnz)
|
||||||
|
* [youtube:search] Add tests
|
||||||
|
* [twitcasting] Enforce UTF-8 for POST payload by [Lesmiscore](https://github.com/Lesmiscore)
|
||||||
|
* [mediaset] Fix extractor by [nixxo](https://github.com/nixxo)
|
||||||
|
* [websocket] Make syntax error in `websockets` module non-fatal
|
||||||
|
|
||||||
### 2022.02.03
|
### 2022.02.03
|
||||||
|
|
||||||
* Merge youtube-dl: Upto [commit/78ce962](https://github.com/ytdl-org/youtube-dl/commit/78ce962f4fe020994c216dd2671546fbe58a5c67)
|
* Merge youtube-dl: Upto [commit/78ce962](https://github.com/ytdl-org/youtube-dl/commit/78ce962f4fe020994c216dd2671546fbe58a5c67)
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ yt-dlp is a [youtube-dl](https://github.com/ytdl-org/youtube-dl) fork based on t
|
|||||||
|
|
||||||
# NEW FEATURES
|
# NEW FEATURES
|
||||||
|
|
||||||
* Based on **youtube-dl 2021.12.17 [commit/78ce962](https://github.com/ytdl-org/youtube-dl/commit/78ce962f4fe020994c216dd2671546fbe58a5c67)** and **youtube-dlc 2020.11.11-3 [commit/f9401f2](https://github.com/blackjack4494/yt-dlc/commit/f9401f2a91987068139c5f757b12fc711d4c0cee)**: You get all the features and patches of [youtube-dlc](https://github.com/blackjack4494/yt-dlc) in addition to the latest [youtube-dl](https://github.com/ytdl-org/youtube-dl)
|
* Based on **youtube-dl 2021.12.17 [commit/5add3f4](https://github.com/ytdl-org/youtube-dl/commit/5add3f4373287e6346ca3551239edab549284db3)** and **youtube-dlc 2020.11.11-3 [commit/f9401f2](https://github.com/blackjack4494/yt-dlc/commit/f9401f2a91987068139c5f757b12fc711d4c0cee)**: You get all the features and patches of [youtube-dlc](https://github.com/blackjack4494/yt-dlc) in addition to the latest [youtube-dl](https://github.com/ytdl-org/youtube-dl)
|
||||||
|
|
||||||
* **[SponsorBlock Integration](#sponsorblock-options)**: You can mark/remove sponsor sections in youtube videos by utilizing the [SponsorBlock](https://sponsor.ajay.app) API
|
* **[SponsorBlock Integration](#sponsorblock-options)**: You can mark/remove sponsor sections in youtube videos by utilizing the [SponsorBlock](https://sponsor.ajay.app) API
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,12 @@ import threading
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import websockets
|
import websockets
|
||||||
has_websockets = True
|
except (ImportError, SyntaxError):
|
||||||
except ImportError:
|
# websockets 3.10 on python 3.6 causes SyntaxError
|
||||||
|
# See https://github.com/yt-dlp/yt-dlp/issues/2633
|
||||||
has_websockets = False
|
has_websockets = False
|
||||||
|
else:
|
||||||
|
has_websockets = True
|
||||||
|
|
||||||
from .common import FileDownloader
|
from .common import FileDownloader
|
||||||
from .external import FFmpegFD
|
from .external import FFmpegFD
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import re
|
|||||||
from .theplatform import ThePlatformBaseIE
|
from .theplatform import ThePlatformBaseIE
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
ExtractorError,
|
ExtractorError,
|
||||||
|
GeoRestrictedError,
|
||||||
int_or_none,
|
int_or_none,
|
||||||
OnDemandPagedList,
|
OnDemandPagedList,
|
||||||
parse_qs,
|
parse_qs,
|
||||||
@@ -37,7 +38,7 @@ class MediasetIE(ThePlatformBaseIE):
|
|||||||
'id': 'F310575103000102',
|
'id': 'F310575103000102',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'Episodio 1',
|
'title': 'Episodio 1',
|
||||||
'description': 'md5:d41d8cd98f00b204e9800998ecf8427e',
|
'description': 'md5:e8017b7d7194e9bfb75299c2b8d81e02',
|
||||||
'thumbnail': r're:^https?://.*\.jpg$',
|
'thumbnail': r're:^https?://.*\.jpg$',
|
||||||
'duration': 2682.0,
|
'duration': 2682.0,
|
||||||
'upload_date': '20210530',
|
'upload_date': '20210530',
|
||||||
@@ -45,6 +46,11 @@ class MediasetIE(ThePlatformBaseIE):
|
|||||||
'timestamp': 1622413946,
|
'timestamp': 1622413946,
|
||||||
'uploader': 'Canale 5',
|
'uploader': 'Canale 5',
|
||||||
'uploader_id': 'C5',
|
'uploader_id': 'C5',
|
||||||
|
'season': 'Season 1',
|
||||||
|
'episode': 'Episode 1',
|
||||||
|
'season_number': 1,
|
||||||
|
'episode_number': 1,
|
||||||
|
'chapters': [{'start_time': 0.0, 'end_time': 439.88}, {'start_time': 439.88, 'end_time': 1685.84}, {'start_time': 1685.84, 'end_time': 2682.0}],
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
'url': 'https://www.mediasetplay.mediaset.it/video/matrix/puntata-del-25-maggio_F309013801000501',
|
'url': 'https://www.mediasetplay.mediaset.it/video/matrix/puntata-del-25-maggio_F309013801000501',
|
||||||
@@ -53,7 +59,7 @@ class MediasetIE(ThePlatformBaseIE):
|
|||||||
'id': 'F309013801000501',
|
'id': 'F309013801000501',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'Puntata del 25 maggio',
|
'title': 'Puntata del 25 maggio',
|
||||||
'description': 'md5:d41d8cd98f00b204e9800998ecf8427e',
|
'description': 'md5:ee2e456e3eb1dba5e814596655bb5296',
|
||||||
'thumbnail': r're:^https?://.*\.jpg$',
|
'thumbnail': r're:^https?://.*\.jpg$',
|
||||||
'duration': 6565.008,
|
'duration': 6565.008,
|
||||||
'upload_date': '20200903',
|
'upload_date': '20200903',
|
||||||
@@ -61,6 +67,11 @@ class MediasetIE(ThePlatformBaseIE):
|
|||||||
'timestamp': 1599172492,
|
'timestamp': 1599172492,
|
||||||
'uploader': 'Canale 5',
|
'uploader': 'Canale 5',
|
||||||
'uploader_id': 'C5',
|
'uploader_id': 'C5',
|
||||||
|
'season': 'Season 5',
|
||||||
|
'episode': 'Episode 5',
|
||||||
|
'season_number': 5,
|
||||||
|
'episode_number': 5,
|
||||||
|
'chapters': [{'start_time': 0.0, 'end_time': 3409.08}, {'start_time': 3409.08, 'end_time': 6565.008}],
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
'url': 'https://www.mediasetplay.mediaset.it/video/cameracafe5/episodio-69-pezzo-di-luna_F303843101017801',
|
'url': 'https://www.mediasetplay.mediaset.it/video/cameracafe5/episodio-69-pezzo-di-luna_F303843101017801',
|
||||||
@@ -69,7 +80,7 @@ class MediasetIE(ThePlatformBaseIE):
|
|||||||
'id': 'F303843101017801',
|
'id': 'F303843101017801',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'Episodio 69 - Pezzo di luna',
|
'title': 'Episodio 69 - Pezzo di luna',
|
||||||
'description': '',
|
'description': 'md5:7c32c8ec4118b72588b9412f11353f73',
|
||||||
'thumbnail': r're:^https?://.*\.jpg$',
|
'thumbnail': r're:^https?://.*\.jpg$',
|
||||||
'duration': 263.008,
|
'duration': 263.008,
|
||||||
'upload_date': '20200902',
|
'upload_date': '20200902',
|
||||||
@@ -77,6 +88,11 @@ class MediasetIE(ThePlatformBaseIE):
|
|||||||
'timestamp': 1599064700,
|
'timestamp': 1599064700,
|
||||||
'uploader': 'Italia 1',
|
'uploader': 'Italia 1',
|
||||||
'uploader_id': 'I1',
|
'uploader_id': 'I1',
|
||||||
|
'season': 'Season 5',
|
||||||
|
'episode': 'Episode 178',
|
||||||
|
'season_number': 5,
|
||||||
|
'episode_number': 178,
|
||||||
|
'chapters': [{'start_time': 0.0, 'end_time': 261.88}, {'start_time': 261.88, 'end_time': 263.008}],
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
'url': 'https://www.mediasetplay.mediaset.it/video/cameracafe5/episodio-51-tu-chi-sei_F303843107000601',
|
'url': 'https://www.mediasetplay.mediaset.it/video/cameracafe5/episodio-51-tu-chi-sei_F303843107000601',
|
||||||
@@ -85,7 +101,7 @@ class MediasetIE(ThePlatformBaseIE):
|
|||||||
'id': 'F303843107000601',
|
'id': 'F303843107000601',
|
||||||
'ext': 'mp4',
|
'ext': 'mp4',
|
||||||
'title': 'Episodio 51 - Tu chi sei?',
|
'title': 'Episodio 51 - Tu chi sei?',
|
||||||
'description': '',
|
'description': 'md5:42ef006e56824cc31787a547590923f4',
|
||||||
'thumbnail': r're:^https?://.*\.jpg$',
|
'thumbnail': r're:^https?://.*\.jpg$',
|
||||||
'duration': 367.021,
|
'duration': 367.021,
|
||||||
'upload_date': '20200902',
|
'upload_date': '20200902',
|
||||||
@@ -93,6 +109,28 @@ class MediasetIE(ThePlatformBaseIE):
|
|||||||
'timestamp': 1599069817,
|
'timestamp': 1599069817,
|
||||||
'uploader': 'Italia 1',
|
'uploader': 'Italia 1',
|
||||||
'uploader_id': 'I1',
|
'uploader_id': 'I1',
|
||||||
|
'season': 'Season 5',
|
||||||
|
'episode': 'Episode 6',
|
||||||
|
'season_number': 5,
|
||||||
|
'episode_number': 6,
|
||||||
|
'chapters': [{'start_time': 0.0, 'end_time': 358.68}, {'start_time': 358.68, 'end_time': 367.021}],
|
||||||
|
},
|
||||||
|
}, {
|
||||||
|
# movie
|
||||||
|
'url': 'https://www.mediasetplay.mediaset.it/movie/selvaggi/selvaggi_F006474501000101',
|
||||||
|
'md5': '720440187a2ae26af8148eb9e6b901ed',
|
||||||
|
'info_dict': {
|
||||||
|
'id': 'F006474501000101',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'Selvaggi',
|
||||||
|
'description': 'md5:cfdedbbfdd12d4d0e5dcf1fa1b75284f',
|
||||||
|
'thumbnail': r're:^https?://.*\.jpg$',
|
||||||
|
'duration': 5233.01,
|
||||||
|
'upload_date': '20210729',
|
||||||
|
'timestamp': 1627594716,
|
||||||
|
'uploader': 'Cine34',
|
||||||
|
'uploader_id': 'B6',
|
||||||
|
'chapters': [{'start_time': 0.0, 'end_time': 1938.56}, {'start_time': 1938.56, 'end_time': 5233.01}],
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
# clip
|
# clip
|
||||||
@@ -160,6 +198,22 @@ class MediasetIE(ThePlatformBaseIE):
|
|||||||
video.attrib['src'] = re.sub(r'(https?://vod05)t(-mediaset-it\.akamaized\.net/.+?.mpd)\?.+', r'\1\2', video.attrib['src'])
|
video.attrib['src'] = re.sub(r'(https?://vod05)t(-mediaset-it\.akamaized\.net/.+?.mpd)\?.+', r'\1\2', video.attrib['src'])
|
||||||
return super(MediasetIE, self)._parse_smil_formats(smil, smil_url, video_id, namespace, f4m_params, transform_rtmp_url)
|
return super(MediasetIE, self)._parse_smil_formats(smil, smil_url, video_id, namespace, f4m_params, transform_rtmp_url)
|
||||||
|
|
||||||
|
def _check_drm_formats(self, tp_formats, video_id):
|
||||||
|
has_nondrm, drm_manifest = False, ''
|
||||||
|
for f in tp_formats:
|
||||||
|
if '_sampleaes/' in (f.get('manifest_url') or ''):
|
||||||
|
drm_manifest = drm_manifest or f['manifest_url']
|
||||||
|
f['has_drm'] = True
|
||||||
|
if not f.get('has_drm') and f.get('manifest_url'):
|
||||||
|
has_nondrm = True
|
||||||
|
|
||||||
|
nodrm_manifest = re.sub(r'_sampleaes/(\w+)_fp_', r'/\1_no_', drm_manifest)
|
||||||
|
if has_nondrm or nodrm_manifest == drm_manifest:
|
||||||
|
return
|
||||||
|
|
||||||
|
tp_formats.extend(self._extract_m3u8_formats(
|
||||||
|
nodrm_manifest, video_id, m3u8_id='hls', fatal=False) or [])
|
||||||
|
|
||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
guid = self._match_id(url)
|
guid = self._match_id(url)
|
||||||
tp_path = 'PR1GhC/media/guid/2702976343/' + guid
|
tp_path = 'PR1GhC/media/guid/2702976343/' + guid
|
||||||
@@ -167,10 +221,10 @@ class MediasetIE(ThePlatformBaseIE):
|
|||||||
|
|
||||||
formats = []
|
formats = []
|
||||||
subtitles = {}
|
subtitles = {}
|
||||||
first_e = None
|
first_e = geo_e = None
|
||||||
asset_type = 'geoNo:HD,browser,geoIT|geoNo:HD,geoIT|geoNo:SD,browser,geoIT|geoNo:SD,geoIT|geoNo|HD|SD'
|
asset_type = 'geoNo:HD,browser,geoIT|geoNo:HD,geoIT|geoNo:SD,browser,geoIT|geoNo:SD,geoIT|geoNo|HD|SD'
|
||||||
# TODO: fixup ISM+none manifest URLs
|
# TODO: fixup ISM+none manifest URLs
|
||||||
for f in ('MPEG4', 'MPEG-DASH+none', 'M3U+none'):
|
for f in ('MPEG4', 'M3U'):
|
||||||
try:
|
try:
|
||||||
tp_formats, tp_subtitles = self._extract_theplatform_smil(
|
tp_formats, tp_subtitles = self._extract_theplatform_smil(
|
||||||
update_url_query('http://link.theplatform.%s/s/%s' % (self._TP_TLD, tp_path), {
|
update_url_query('http://link.theplatform.%s/s/%s' % (self._TP_TLD, tp_path), {
|
||||||
@@ -179,13 +233,19 @@ class MediasetIE(ThePlatformBaseIE):
|
|||||||
'assetTypes': asset_type,
|
'assetTypes': asset_type,
|
||||||
}), guid, 'Downloading %s SMIL data' % (f.split('+')[0]))
|
}), guid, 'Downloading %s SMIL data' % (f.split('+')[0]))
|
||||||
except ExtractorError as e:
|
except ExtractorError as e:
|
||||||
|
if not geo_e and isinstance(e, GeoRestrictedError):
|
||||||
|
geo_e = e
|
||||||
if not first_e:
|
if not first_e:
|
||||||
first_e = e
|
first_e = e
|
||||||
break
|
continue
|
||||||
|
self._check_drm_formats(tp_formats, guid)
|
||||||
formats.extend(tp_formats)
|
formats.extend(tp_formats)
|
||||||
subtitles = self._merge_subtitles(subtitles, tp_subtitles)
|
subtitles = self._merge_subtitles(subtitles, tp_subtitles)
|
||||||
if first_e and not formats:
|
|
||||||
raise first_e
|
# check for errors and report them
|
||||||
|
if (first_e or geo_e) and not formats:
|
||||||
|
raise geo_e or first_e
|
||||||
|
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
feed_data = self._download_json(
|
feed_data = self._download_json(
|
||||||
@@ -201,15 +261,22 @@ class MediasetIE(ThePlatformBaseIE):
|
|||||||
break
|
break
|
||||||
|
|
||||||
info.update({
|
info.update({
|
||||||
'episode_number': int_or_none(feed_data.get('tvSeasonEpisodeNumber')),
|
'description': info.get('description') or feed_data.get('description') or feed_data.get('longDescription'),
|
||||||
'season_number': int_or_none(feed_data.get('tvSeasonNumber')),
|
|
||||||
'series': feed_data.get('mediasetprogram$brandTitle'),
|
|
||||||
'uploader': publish_info.get('description'),
|
'uploader': publish_info.get('description'),
|
||||||
'uploader_id': publish_info.get('channel'),
|
'uploader_id': publish_info.get('channel'),
|
||||||
'view_count': int_or_none(feed_data.get('mediasetprogram$numberOfViews')),
|
'view_count': int_or_none(feed_data.get('mediasetprogram$numberOfViews')),
|
||||||
'thumbnail': thumbnail,
|
'thumbnail': thumbnail,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if feed_data.get('programType') == 'episode':
|
||||||
|
info.update({
|
||||||
|
'episode_number': int_or_none(
|
||||||
|
feed_data.get('tvSeasonEpisodeNumber')),
|
||||||
|
'season_number': int_or_none(
|
||||||
|
feed_data.get('tvSeasonNumber')),
|
||||||
|
'series': feed_data.get('mediasetprogram$brandTitle'),
|
||||||
|
})
|
||||||
|
|
||||||
info.update({
|
info.update({
|
||||||
'id': guid,
|
'id': guid,
|
||||||
'formats': formats,
|
'formats': formats,
|
||||||
@@ -224,37 +291,29 @@ class MediasetShowIE(MediasetIE):
|
|||||||
https?://
|
https?://
|
||||||
(?:(?:www|static3)\.)?mediasetplay\.mediaset\.it/
|
(?:(?:www|static3)\.)?mediasetplay\.mediaset\.it/
|
||||||
(?:
|
(?:
|
||||||
(?:fiction|programmi-tv|serie-tv)/(?:.+?/)?
|
(?:fiction|programmi-tv|serie-tv|kids)/(?:.+?/)?
|
||||||
(?:[a-z]+)_SE(?P<id>\d{12})
|
(?:[a-z-]+)_SE(?P<id>\d{12})
|
||||||
(?:,ST(?P<st>\d{12}))?
|
(?:,ST(?P<st>\d{12}))?
|
||||||
(?:,sb(?P<sb>\d{9}))?$
|
(?:,sb(?P<sb>\d{9}))?$
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
'''
|
'''
|
||||||
_TESTS = [{
|
_TESTS = [{
|
||||||
# TV Show webpage (with a single playlist)
|
# TV Show webpage (general webpage)
|
||||||
'url': 'https://www.mediasetplay.mediaset.it/serie-tv/fireforce/episodi_SE000000001556',
|
'url': 'https://www.mediasetplay.mediaset.it/programmi-tv/leiene/leiene_SE000000000061',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '000000001556',
|
'id': '000000000061',
|
||||||
'title': 'Fire Force',
|
'title': 'Le Iene',
|
||||||
},
|
},
|
||||||
'playlist_count': 1,
|
'playlist_mincount': 7,
|
||||||
}, {
|
}, {
|
||||||
# TV Show webpage (with multiple playlists)
|
# TV Show webpage (specific season)
|
||||||
'url': 'https://www.mediasetplay.mediaset.it/programmi-tv/leiene/leiene_SE000000000061,ST000000002763',
|
'url': 'https://www.mediasetplay.mediaset.it/programmi-tv/leiene/leiene_SE000000000061,ST000000002763',
|
||||||
'info_dict': {
|
'info_dict': {
|
||||||
'id': '000000002763',
|
'id': '000000002763',
|
||||||
'title': 'Le Iene',
|
'title': 'Le Iene',
|
||||||
},
|
},
|
||||||
'playlist_count': 7,
|
'playlist_mincount': 7,
|
||||||
}, {
|
|
||||||
# TV Show specific playlist (single page)
|
|
||||||
'url': 'https://www.mediasetplay.mediaset.it/serie-tv/fireforce/episodi_SE000000001556,ST000000002738,sb100013107',
|
|
||||||
'info_dict': {
|
|
||||||
'id': '100013107',
|
|
||||||
'title': 'Episodi',
|
|
||||||
},
|
|
||||||
'playlist_count': 4,
|
|
||||||
}, {
|
}, {
|
||||||
# TV Show specific playlist (with multiple pages)
|
# TV Show specific playlist (with multiple pages)
|
||||||
'url': 'https://www.mediasetplay.mediaset.it/programmi-tv/leiene/iservizi_SE000000000061,ST000000002763,sb100013375',
|
'url': 'https://www.mediasetplay.mediaset.it/programmi-tv/leiene/iservizi_SE000000000061,ST000000002763,sb100013375',
|
||||||
@@ -262,7 +321,7 @@ class MediasetShowIE(MediasetIE):
|
|||||||
'id': '100013375',
|
'id': '100013375',
|
||||||
'title': 'I servizi',
|
'title': 'I servizi',
|
||||||
},
|
},
|
||||||
'playlist_count': 53,
|
'playlist_mincount': 50,
|
||||||
}]
|
}]
|
||||||
|
|
||||||
_BY_SUBBRAND = 'https://feed.entertainment.tv.theplatform.eu/f/PR1GhC/mediaset-prod-all-programs-v2?byCustomValue={subBrandId}{%s}&sort=:publishInfo_lastPublished|desc,tvSeasonEpisodeNumber|desc&range=%d-%d'
|
_BY_SUBBRAND = 'https://feed.entertainment.tv.theplatform.eu/f/PR1GhC/mediaset-prod-all-programs-v2?byCustomValue={subBrandId}{%s}&sort=:publishInfo_lastPublished|desc,tvSeasonEpisodeNumber|desc&range=%d-%d'
|
||||||
@@ -281,7 +340,7 @@ class MediasetShowIE(MediasetIE):
|
|||||||
def _real_extract(self, url):
|
def _real_extract(self, url):
|
||||||
playlist_id, st, sb = self._match_valid_url(url).group('id', 'st', 'sb')
|
playlist_id, st, sb = self._match_valid_url(url).group('id', 'st', 'sb')
|
||||||
if not sb:
|
if not sb:
|
||||||
page = self._download_webpage(url, playlist_id)
|
page = self._download_webpage(url, st or playlist_id)
|
||||||
entries = [self.url_result(urljoin('https://www.mediasetplay.mediaset.it', url))
|
entries = [self.url_result(urljoin('https://www.mediasetplay.mediaset.it', url))
|
||||||
for url in re.findall(r'href="([^<>=]+SE\d{12},ST\d{12},sb\d{9})">[^<]+<', page)]
|
for url in re.findall(r'href="([^<>=]+SE\d{12},ST\d{12},sb\d{9})">[^<]+<', page)]
|
||||||
title = (self._html_search_regex(r'(?s)<h1[^>]*>(.+?)</h1>', page, 'title', default=None)
|
title = (self._html_search_regex(r'(?s)<h1[^>]*>(.+?)</h1>', page, 'title', default=None)
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ class TwitCastingIE(InfoExtractor):
|
|||||||
if video_password:
|
if video_password:
|
||||||
request_data = urlencode_postdata({
|
request_data = urlencode_postdata({
|
||||||
'password': video_password,
|
'password': video_password,
|
||||||
})
|
}, encoding='utf-8')
|
||||||
webpage = self._download_webpage(
|
webpage = self._download_webpage(
|
||||||
url, video_id, data=request_data,
|
url, video_id, data=request_data,
|
||||||
headers={'Origin': 'https://twitcasting.tv'})
|
headers={'Origin': 'https://twitcasting.tv'})
|
||||||
|
|||||||
@@ -4273,7 +4273,7 @@ class YoutubeTabBaseInfoExtractor(YoutubeBaseInfoExtractor):
|
|||||||
|
|
||||||
_SEARCH_PARAMS = None
|
_SEARCH_PARAMS = None
|
||||||
|
|
||||||
def _search_results(self, query, params=NO_DEFAULT, client=None):
|
def _search_results(self, query, params=NO_DEFAULT, default_client='web'):
|
||||||
data = {'query': query}
|
data = {'query': query}
|
||||||
if params is NO_DEFAULT:
|
if params is NO_DEFAULT:
|
||||||
params = self._SEARCH_PARAMS
|
params = self._SEARCH_PARAMS
|
||||||
@@ -4294,7 +4294,7 @@ class YoutubeTabBaseInfoExtractor(YoutubeBaseInfoExtractor):
|
|||||||
data.update(continuation_list[0] or {})
|
data.update(continuation_list[0] or {})
|
||||||
search = self._extract_response(
|
search = self._extract_response(
|
||||||
item_id='query "%s" page %s' % (query, page_num), ep='search', query=data,
|
item_id='query "%s" page %s' % (query, page_num), ep='search', query=data,
|
||||||
default_client=client, check_get_keys=check_get_keys)
|
default_client=default_client, check_get_keys=check_get_keys)
|
||||||
slr_contents = traverse_obj(search, *content_keys)
|
slr_contents = traverse_obj(search, *content_keys)
|
||||||
yield from self._extract_entries({'contents': list(variadic(slr_contents))}, continuation_list)
|
yield from self._extract_entries({'contents': list(variadic(slr_contents))}, continuation_list)
|
||||||
if not continuation_list[0]:
|
if not continuation_list[0]:
|
||||||
@@ -5311,7 +5311,14 @@ class YoutubeSearchIE(YoutubeTabBaseInfoExtractor, SearchInfoExtractor):
|
|||||||
IE_NAME = 'youtube:search'
|
IE_NAME = 'youtube:search'
|
||||||
_SEARCH_KEY = 'ytsearch'
|
_SEARCH_KEY = 'ytsearch'
|
||||||
_SEARCH_PARAMS = 'EgIQAQ%3D%3D' # Videos only
|
_SEARCH_PARAMS = 'EgIQAQ%3D%3D' # Videos only
|
||||||
_TESTS = []
|
_TESTS = [{
|
||||||
|
'url': 'ytsearch5:youtube-dl test video',
|
||||||
|
'playlist_count': 5,
|
||||||
|
'info_dict': {
|
||||||
|
'id': 'youtube-dl test video',
|
||||||
|
'title': 'youtube-dl test video',
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
|
||||||
|
|
||||||
class YoutubeSearchDateIE(YoutubeTabBaseInfoExtractor, SearchInfoExtractor):
|
class YoutubeSearchDateIE(YoutubeTabBaseInfoExtractor, SearchInfoExtractor):
|
||||||
@@ -5319,7 +5326,14 @@ class YoutubeSearchDateIE(YoutubeTabBaseInfoExtractor, SearchInfoExtractor):
|
|||||||
_SEARCH_KEY = 'ytsearchdate'
|
_SEARCH_KEY = 'ytsearchdate'
|
||||||
IE_DESC = 'YouTube search, newest videos first'
|
IE_DESC = 'YouTube search, newest videos first'
|
||||||
_SEARCH_PARAMS = 'CAISAhAB' # Videos only, sorted by date
|
_SEARCH_PARAMS = 'CAISAhAB' # Videos only, sorted by date
|
||||||
_TESTS = []
|
_TESTS = [{
|
||||||
|
'url': 'ytsearchdate5:youtube-dl test video',
|
||||||
|
'playlist_count': 5,
|
||||||
|
'info_dict': {
|
||||||
|
'id': 'youtube-dl test video',
|
||||||
|
'title': 'youtube-dl test video',
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
|
||||||
|
|
||||||
class YoutubeSearchURLIE(YoutubeTabBaseInfoExtractor):
|
class YoutubeSearchURLIE(YoutubeTabBaseInfoExtractor):
|
||||||
@@ -5402,7 +5416,7 @@ class YoutubeMusicSearchURLIE(YoutubeTabBaseInfoExtractor):
|
|||||||
if not params:
|
if not params:
|
||||||
section = None
|
section = None
|
||||||
title = join_nonempty(query, section, delim=' - ')
|
title = join_nonempty(query, section, delim=' - ')
|
||||||
return self.playlist_result(self._search_results(query, params, client='web_music'), title, title)
|
return self.playlist_result(self._search_results(query, params, default_client='web_music'), title, title)
|
||||||
|
|
||||||
|
|
||||||
class YoutubeFeedsInfoExtractor(InfoExtractor):
|
class YoutubeFeedsInfoExtractor(InfoExtractor):
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Autogenerated by devscripts/update-version.py
|
# Autogenerated by devscripts/update-version.py
|
||||||
|
|
||||||
__version__ = '2022.02.03'
|
__version__ = '2022.02.04'
|
||||||
|
|
||||||
RELEASE_GIT_HEAD = '28469edd7'
|
RELEASE_GIT_HEAD = 'c1653e9ef'
|
||||||
|
|||||||
Reference in New Issue
Block a user