Compare commits

...

4 Commits

Author SHA1 Message Date
Allan Daemon
55e466b153
Merge f8703c4291 into e1b3fa242c 2024-07-27 20:18:42 +09:00
Allan Daemon
f8703c4291 Give MySpace artist support a better name 2020-12-03 00:28:27 -03:00
Allan Daemon
7ae403d9fd [myspace] Fix issues for merging of all songs of an artist inclusion 2020-12-03 00:26:17 -03:00
Allan Daemon
48da538f7d [myspace] Added support for downloading all songs of an artist 2020-12-03 00:26:17 -03:00
2 changed files with 33 additions and 8 deletions

View File

@ -738,7 +738,7 @@ from .mtv import (
from .muenchentv import MuenchenTVIE
from .mwave import MwaveIE, MwaveMeetGreetIE
from .mychannels import MyChannelsIE
from .myspace import MySpaceIE, MySpaceAlbumIE
from .myspace import MySpaceIE, MySpaceAlbumIE, MySpaceArtistIE
from .myspass import MySpassIE
from .myvi import (
MyviIE,

View File

@ -203,10 +203,35 @@ class MySpaceAlbumIE(InfoExtractor):
entries = [
self.url_result(t_path, ie=MySpaceIE.ie_key())
for t_path in tracks_paths]
return {
'_type': 'playlist',
'id': playlist_id,
'display_id': display_id,
'title': self._og_search_title(webpage),
'entries': entries,
}
return self.playlist_result(entries, playlist_id, self._og_search_title(webpage))
class MySpaceArtistIE(InfoExtractor):
IE_NAME = 'MySpace:artist'
_VALID_URL = r'https?://myspace\.com/(?P<artist>[^/]*)/music/songs'
_TEST = {
'url': 'https://myspace.com/studio99/music/songs/',
'info_dict': {
'title': 'Studio 99 IS CLOSED!! R.I.P.',
},
'playlist_count': 4,
}
def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url)
display_id = mobj.group('artist')
webpage = self._download_webpage(url, display_id)
tracks_paths = re.findall(r'<meta itemprop="url" content ="(.*?)">', webpage)
if not tracks_paths:
raise ExtractorError(
'%s: No songs found, try using proxy' % display_id,
expected=True)
entries = [
self.url_result('https://myspace.com/' + display_id + t_path, ie=MySpaceIE.ie_key())
for t_path in tracks_paths if t_path.startswith('/music/song/')]
# if we invert this if, we get album urls. but not all music are in alba.
# Also the musics in alba are already here individually
return self.playlist_result(entries, playlist_title=self._og_search_title(webpage))