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