]>
Commit | Line | Data |
---|---|---|
0ef3d470 B |
1 | from .common import InfoExtractor |
2 | from .youtube import YoutubeIE, YoutubeTabIE | |
3 | ||
4 | ||
5 | class BeatBumpVideoIE(InfoExtractor): | |
6 | _VALID_URL = r'https://beatbump\.ml/listen\?id=(?P<id>[\w-]+)' | |
7 | _TESTS = [{ | |
8 | 'url': 'https://beatbump.ml/listen?id=MgNrAu2pzNs', | |
9 | 'md5': '5ff3fff41d3935b9810a9731e485fe66', | |
10 | 'info_dict': { | |
11 | 'id': 'MgNrAu2pzNs', | |
12 | 'ext': 'mp4', | |
13 | 'uploader_url': 'http://www.youtube.com/channel/UC-pWHpBjdGG69N9mM2auIAA', | |
14 | 'artist': 'Stephen', | |
15 | 'thumbnail': 'https://i.ytimg.com/vi_webp/MgNrAu2pzNs/maxresdefault.webp', | |
16 | 'channel_url': 'https://www.youtube.com/channel/UC-pWHpBjdGG69N9mM2auIAA', | |
17 | 'upload_date': '20190312', | |
18 | 'categories': ['Music'], | |
19 | 'playable_in_embed': True, | |
20 | 'duration': 169, | |
21 | 'like_count': int, | |
22 | 'alt_title': 'Voyeur Girl', | |
23 | 'view_count': int, | |
24 | 'track': 'Voyeur Girl', | |
25 | 'uploader': 'Stephen - Topic', | |
26 | 'title': 'Voyeur Girl', | |
27 | 'channel_follower_count': int, | |
28 | 'uploader_id': 'UC-pWHpBjdGG69N9mM2auIAA', | |
29 | 'age_limit': 0, | |
30 | 'availability': 'public', | |
31 | 'live_status': 'not_live', | |
32 | 'album': 'it\'s too much love to know my dear', | |
33 | 'channel': 'Stephen', | |
34 | 'comment_count': int, | |
35 | 'description': 'md5:7ae382a65843d6df2685993e90a8628f', | |
36 | 'tags': 'count:11', | |
37 | 'creator': 'Stephen', | |
38 | 'channel_id': 'UC-pWHpBjdGG69N9mM2auIAA', | |
39 | } | |
40 | }] | |
41 | ||
42 | def _real_extract(self, url): | |
43 | id_ = self._match_id(url) | |
44 | return self.url_result(f'https://music.youtube.com/watch?v={id_}', YoutubeIE, id_) | |
45 | ||
46 | ||
47 | class BeatBumpPlaylistIE(InfoExtractor): | |
48 | _VALID_URL = r'https://beatbump\.ml/(?:release\?id=|artist/|playlist/)(?P<id>[\w-]+)' | |
49 | _TESTS = [{ | |
50 | 'url': 'https://beatbump.ml/release?id=MPREb_gTAcphH99wE', | |
51 | 'playlist_count': 50, | |
52 | 'info_dict': { | |
53 | 'id': 'OLAK5uy_l1m0thk3g31NmIIz_vMIbWtyv7eZixlH0', | |
54 | 'availability': 'unlisted', | |
55 | 'view_count': int, | |
56 | 'title': 'Album - Royalty Free Music Library V2 (50 Songs)', | |
57 | 'description': '', | |
58 | 'tags': [], | |
59 | 'modified_date': '20221223', | |
60 | } | |
61 | }, { | |
62 | 'url': 'https://beatbump.ml/artist/UC_aEa8K-EOJ3D6gOs7HcyNg', | |
63 | 'playlist_mincount': 1, | |
64 | 'params': {'flatplaylist': True}, | |
65 | 'info_dict': { | |
66 | 'id': 'UC_aEa8K-EOJ3D6gOs7HcyNg', | |
67 | 'uploader_url': 'https://www.youtube.com/channel/UC_aEa8K-EOJ3D6gOs7HcyNg', | |
68 | 'channel_url': 'https://www.youtube.com/channel/UC_aEa8K-EOJ3D6gOs7HcyNg', | |
69 | 'uploader_id': 'UC_aEa8K-EOJ3D6gOs7HcyNg', | |
70 | 'channel_follower_count': int, | |
71 | 'title': 'NoCopyrightSounds - Videos', | |
72 | 'uploader': 'NoCopyrightSounds', | |
73 | 'description': 'md5:cd4fd53d81d363d05eee6c1b478b491a', | |
74 | 'channel': 'NoCopyrightSounds', | |
75 | 'tags': 'count:12', | |
76 | 'channel_id': 'UC_aEa8K-EOJ3D6gOs7HcyNg', | |
77 | }, | |
78 | }, { | |
79 | 'url': 'https://beatbump.ml/playlist/VLPLRBp0Fe2GpgmgoscNFLxNyBVSFVdYmFkq', | |
80 | 'playlist_mincount': 1, | |
81 | 'params': {'flatplaylist': True}, | |
82 | 'info_dict': { | |
83 | 'id': 'PLRBp0Fe2GpgmgoscNFLxNyBVSFVdYmFkq', | |
84 | 'uploader_url': 'https://www.youtube.com/@NoCopyrightSounds', | |
85 | 'description': 'Providing you with copyright free / safe music for gaming, live streaming, studying and more!', | |
86 | 'view_count': int, | |
87 | 'channel_url': 'https://www.youtube.com/@NoCopyrightSounds', | |
88 | 'uploader_id': 'UC_aEa8K-EOJ3D6gOs7HcyNg', | |
89 | 'title': 'NCS : All Releases 💿', | |
90 | 'uploader': 'NoCopyrightSounds', | |
91 | 'availability': 'public', | |
92 | 'channel': 'NoCopyrightSounds', | |
93 | 'tags': [], | |
94 | 'modified_date': '20221225', | |
95 | 'channel_id': 'UC_aEa8K-EOJ3D6gOs7HcyNg', | |
96 | } | |
97 | }] | |
98 | ||
99 | def _real_extract(self, url): | |
100 | id_ = self._match_id(url) | |
101 | return self.url_result(f'https://music.youtube.com/browse/{id_}', YoutubeTabIE, id_) |