Compare commits

...

3 Commits

Author SHA1 Message Date
Aaron Tan
0c085c274d
Merge 2bc9c273a7 into e1b3fa242c 2024-07-28 02:32:45 +09:00
Aaron Tan
2bc9c273a7
[Mediaset] Correct invalid regex
Correct regex to not capture URL that doesn't exist

Co-authored-by: dirkf <fieldhouse@gmx.net>
2023-08-25 13:55:23 +10:00
Aaron Tan
11d68ad77b Update mediaset.py
Mediaset underwent a name change. It used to be called mediasetplay but it's now called mediainfinity. Hence why downloads were failing.

- Updated the regex to reflect the name change.
- Changed the site URL of the first test to one that uses the new name change.
2023-08-09 22:11:09 +10:00

View File

@ -21,7 +21,7 @@ class MediasetIE(ThePlatformBaseIE):
(?: (?:
mediaset:| mediaset:|
https?:// https?://
(?:(?:www|static3)\.)?mediasetplay\.mediaset\.it/ (?:(?:www|(?P<s3>static3))\.)?mediaset(?(s3)play|(?:play|infinity))\.mediaset\.it/
(?: (?:
(?:video|on-demand|movie)/(?:[^/]+/)+[^/]+_| (?:video|on-demand|movie)/(?:[^/]+/)+[^/]+_|
player(?:/v\d+)?/index\.html\?.*?\bprogramGuid= player(?:/v\d+)?/index\.html\?.*?\bprogramGuid=
@ -30,20 +30,19 @@ class MediasetIE(ThePlatformBaseIE):
''' '''
_TESTS = [{ _TESTS = [{
# full episode # full episode
'url': 'https://www.mediasetplay.mediaset.it/video/hellogoodbye/quarta-puntata_FAFU000000661824', 'url': 'https://mediasetinfinity.mediaset.it/video/matrix/saro-in-aula-voglio-guardarli-in-faccia_F308550501001C01',
'md5': '9b75534d42c44ecef7bf1ffeacb7f85d', 'md5': '160a6c662fb85d96bd67f8508cc17ae8',
'info_dict': { 'info_dict': {
'id': 'FAFU000000661824', 'id': 'F308550501001C01',
'ext': 'mp4', 'ext': 'mp4',
'title': 'Quarta puntata', 'title': '"Sarò in aula. Voglio guardarli in faccia"',
'description': 'md5:d41d8cd98f00b204e9800998ecf8427e', 'description': 'md5:d41d8cd98f00b204e9800998ecf8427e',
'thumbnail': r're:^https?://.*\.jpg$', 'duration': 217.019,
'duration': 1414.26, 'upload_date': '20200905',
'upload_date': '20161107', 'series': 'Matrix',
'series': 'Hello Goodbye', 'timestamp': 1599304297,
'timestamp': 1478532900, 'uploader': 'Canale 5',
'uploader': 'Rete 4', 'uploader_id': 'C5',
'uploader_id': 'R4',
}, },
}, { }, {
'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,11 +52,10 @@ class MediasetIE(ThePlatformBaseIE):
'ext': 'mp4', 'ext': 'mp4',
'title': 'Puntata del 25 maggio', 'title': 'Puntata del 25 maggio',
'description': 'md5:d41d8cd98f00b204e9800998ecf8427e', 'description': 'md5:d41d8cd98f00b204e9800998ecf8427e',
'thumbnail': r're:^https?://.*\.jpg$', 'duration': 6565.008,
'duration': 6565.007, 'upload_date': '20200903',
'upload_date': '20180526',
'series': 'Matrix', 'series': 'Matrix',
'timestamp': 1527326245, 'timestamp': 1599172492,
'uploader': 'Canale 5', 'uploader': 'Canale 5',
'uploader_id': 'C5', 'uploader_id': 'C5',
}, },