[ie/Utreon] Support playeur.com (#9182)

Closes #9180
Authored by: DmitryScaletta
This commit is contained in:
DmitryScaletta 2024-02-17 23:39:48 +03:00 committed by GitHub
parent 0bee29493c
commit 41d6b61e98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 27 additions and 10 deletions

View File

@ -10,7 +10,8 @@ from ..utils import (
class UtreonIE(InfoExtractor): class UtreonIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?utreon\.com/v/(?P<id>[\w-]+)' IE_NAME = 'playeur'
_VALID_URL = r'https?://(?:www\.)?(?:utreon|playeur)\.com/v/(?P<id>[\w-]+)'
_TESTS = [{ _TESTS = [{
'url': 'https://utreon.com/v/z_I7ikQbuDw', 'url': 'https://utreon.com/v/z_I7ikQbuDw',
'info_dict': { 'info_dict': {
@ -19,8 +20,9 @@ class UtreonIE(InfoExtractor):
'title': 'Freedom Friday meditation - Rising in the wind', 'title': 'Freedom Friday meditation - Rising in the wind',
'description': 'md5:a9bf15a42434a062fe313b938343ad1b', 'description': 'md5:a9bf15a42434a062fe313b938343ad1b',
'uploader': 'Heather Dawn Elemental Health', 'uploader': 'Heather Dawn Elemental Health',
'thumbnail': 'https://data-1.utreon.com/v/MG/M2/NT/z_I7ikQbuDw/z_I7ikQbuDw_preview.jpg', 'thumbnail': r're:^https?://.+\.jpg',
'release_date': '20210723', 'release_date': '20210723',
'duration': 586,
} }
}, { }, {
'url': 'https://utreon.com/v/jerJw5EOOVU', 'url': 'https://utreon.com/v/jerJw5EOOVU',
@ -28,10 +30,11 @@ class UtreonIE(InfoExtractor):
'id': 'jerJw5EOOVU', 'id': 'jerJw5EOOVU',
'ext': 'mp4', 'ext': 'mp4',
'title': 'When I\'m alone, I love to reflect in peace, to make my dreams come true... [Quotes and Poems]', 'title': 'When I\'m alone, I love to reflect in peace, to make my dreams come true... [Quotes and Poems]',
'description': 'md5:61ee6c2da98be51b04b969ca80273aaa', 'description': 'md5:4026aa3a2c10169c3649926ac8ef62b6',
'uploader': 'Frases e Poemas Quotes and Poems', 'uploader': 'Frases e Poemas Quotes and Poems',
'thumbnail': 'https://data-1.utreon.com/v/Mz/Zh/ND/jerJw5EOOVU/jerJw5EOOVU_89af85470a4b16eededde7f8674c96d9_cover.jpg', 'thumbnail': r're:^https?://.+\.jpg',
'release_date': '20210723', 'release_date': '20210723',
'duration': 60,
} }
}, { }, {
'url': 'https://utreon.com/v/C4ZxXhYBBmE', 'url': 'https://utreon.com/v/C4ZxXhYBBmE',
@ -39,10 +42,11 @@ class UtreonIE(InfoExtractor):
'id': 'C4ZxXhYBBmE', 'id': 'C4ZxXhYBBmE',
'ext': 'mp4', 'ext': 'mp4',
'title': 'Bidens Capital Gains Tax Rate to Test Worlds Highest', 'title': 'Bidens Capital Gains Tax Rate to Test Worlds Highest',
'description': 'md5:fb5a6c2e506f013cc76f133f673bc5c8', 'description': 'md5:995aa9ad0733c0e5863ebdeff954f40e',
'uploader': 'Nomad Capitalist', 'uploader': 'Nomad Capitalist',
'thumbnail': 'https://data-1.utreon.com/v/ZD/k1/Mj/C4ZxXhYBBmE/C4ZxXhYBBmE_628342076198c9c06dd6b2c665978584_cover.jpg', 'thumbnail': r're:^https?://.+\.jpg',
'release_date': '20210723', 'release_date': '20210723',
'duration': 884,
} }
}, { }, {
'url': 'https://utreon.com/v/Y-stEH-FBm8', 'url': 'https://utreon.com/v/Y-stEH-FBm8',
@ -52,15 +56,28 @@ class UtreonIE(InfoExtractor):
'title': 'Creeper-Chan Pranks Steve! 💚 [MINECRAFT ANIME]', 'title': 'Creeper-Chan Pranks Steve! 💚 [MINECRAFT ANIME]',
'description': 'md5:7a48450b0d761b96dec194be0c5ecb5f', 'description': 'md5:7a48450b0d761b96dec194be0c5ecb5f',
'uploader': 'Merryweather Comics', 'uploader': 'Merryweather Comics',
'thumbnail': 'https://data-1.utreon.com/v/MT/E4/Zj/Y-stEH-FBm8/Y-stEH-FBm8_5290676a41a4a1096db133b09f54f77b_cover.jpg', 'thumbnail': r're:^https?://.+\.jpg',
'release_date': '20210718', 'release_date': '20210718',
}}, 'duration': 151,
] }
}, {
'url': 'https://playeur.com/v/Wzqp-UrxSeu',
'info_dict': {
'id': 'Wzqp-UrxSeu',
'ext': 'mp4',
'title': 'Update: Clockwork Basilisk Books on the Way!',
'description': 'md5:d9756b0b1884c904655b0e170d17cea5',
'uploader': 'Forgotten Weapons',
'release_date': '20240208',
'thumbnail': r're:^https?://.+\.jpg',
'duration': 262,
}
}]
def _real_extract(self, url): def _real_extract(self, url):
video_id = self._match_id(url) video_id = self._match_id(url)
json_data = self._download_json( json_data = self._download_json(
'https://api.utreon.com/v1/videos/' + video_id, 'https://api.playeur.com/v1/videos/' + video_id,
video_id) video_id)
videos_json = json_data['videos'] videos_json = json_data['videos']
formats = [{ formats = [{