ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
132.05k stars 10.01k forks source link

BandLab #31184

Open itzTheMeow opened 2 years ago

itzTheMeow commented 2 years ago

Checklist

Example URLs

Description

Support for downloading bandlab songs/playlists/albums.

dirkf commented 2 years ago

The site is a JS application with no meaningful data in the pages that yt-dl would see. An implementer will have to analyze the web traffic generated by the application to see if a yt-dl extractor can support the necessary subset of the interactions.

dirkf commented 2 years ago

Indeed, you've done the analysis that I mentioned and contrary to expectation this is rather straightforward.

In case someone wants to do the rest of the job:

linked JSON, pretty-printed

{
  'caption': 'unreleased song. might use later',
  'comments': [
    {
      'content': 'absolutely insane',
      'counters': {
        'likes': 0,
        'replies': 0
      },
      'createdOn': '2022-08-18T01:39:35Z',
      'creator': {
        'id': '1ee1b5a5-122c-4c05-94e4-ec6dc48001a5',
        'isTippable': false,
        'isVerified': false,
        'name': 'Meow',
        'picture': {
          'blur': {
            'xs': 'https://bandlabimages.azureedge.net/v1.0/users/default/100x100/blur',
            's': 'https://bandlabimages.azureedge.net/v1.0/users/default/360x360/blur',
            'm': 'https://bandlabimages.azureedge.net/v1.0/users/default/640x640/blur',
            'l': 'https://bandlabimages.azureedge.net/v1.0/users/default/1024x1024/blur'
          },
          'color': null,
          'isDefault': true,
          'l': 'https://bandlabimages.azureedge.net/v1.0/users/default/1024x1024',
          'm': 'https://bandlabimages.azureedge.net/v1.0/users/default/640x640',
          'original': 'https://bandlabimages.azureedge.net/v1.0/users/default/',
          's': 'https://bandlabimages.azureedge.net/v1.0/users/default/360x360',
          'url': 'https://bandlabimages.azureedge.net/v1.0/users/default/',
          'xs': 'https://bandlabimages.azureedge.net/v1.0/users/default/100x100'
        },
        'username': 'alexmeow4560'
      },
      'id': '38684107',
      'isLiked': false,
      'permissions': {
        'delete': false
      }
    },
    {
      'content': 'i love',
      'counters': {
        'likes': 0,
        'replies': 0
      },
      'createdOn': '2022-08-17T13:51:20Z',
      'creator': {
        'id': '64c599f5-4055-44f2-875e-5c2da3e84ea8',
        'isTippable': false,
        'isVerified': false,
        'name': 'velo',
        'picture': {
          'blur': {
            'xs': 'https://bandlabimages.azureedge.net/v1.0/users/b23b9db6-6d1b-4a52-8316-05fe1104164b/100x100/blur',
            's': 'https://bandlabimages.azureedge.net/v1.0/users/b23b9db6-6d1b-4a52-8316-05fe1104164b/360x360/blur',
            'm': 'https://bandlabimages.azureedge.net/v1.0/users/b23b9db6-6d1b-4a52-8316-05fe1104164b/640x640/blur',
            'l': 'https://bandlabimages.azureedge.net/v1.0/users/b23b9db6-6d1b-4a52-8316-05fe1104164b/1024x1024/blur'
          },
          'color': '#4A3B5E',
          'isDefault': false,
          'l': 'https://bandlabimages.azureedge.net/v1.0/users/b23b9db6-6d1b-4a52-8316-05fe1104164b/1024x1024',
          'm': 'https://bandlabimages.azureedge.net/v1.0/users/b23b9db6-6d1b-4a52-8316-05fe1104164b/640x640',
          'original': 'https://bandlabimages.azureedge.net/v1.0/users/b23b9db6-6d1b-4a52-8316-05fe1104164b/',
          's': 'https://bandlabimages.azureedge.net/v1.0/users/b23b9db6-6d1b-4a52-8316-05fe1104164b/360x360',
          'url': 'https://bandlabimages.azureedge.net/v1.0/users/b23b9db6-6d1b-4a52-8316-05fe1104164b/',
          'xs': 'https://bandlabimages.azureedge.net/v1.0/users/b23b9db6-6d1b-4a52-8316-05fe1104164b/100x100'
        },
        'username': 'velo488'
      },
      'id': '38660956',
      'isLiked': false,
      'permissions': {
        'delete': false
      }
    }
  ],
  'counters': {
    'comments': 2,
    'likes': 5,
    'plays': 11
  },
  'createdOn': '2022-05-23T01:54:42Z',
  'creator': {
    'id': 'f5f04998-635a-44ea-819c-acdba7ae2076',
    'isTippable': false,
    'isVerified': false,
    'name': 'Michael MacDonald',
    'picture': {
      'blur': {
        'xs': 'https://bandlabimages.azureedge.net/v1.0/users/e5623735-1f57-4ef5-a7c0-91802a7ef233/100x100/blur',
        's': 'https://bandlabimages.azureedge.net/v1.0/users/e5623735-1f57-4ef5-a7c0-91802a7ef233/360x360/blur',
        'm': 'https://bandlabimages.azureedge.net/v1.0/users/e5623735-1f57-4ef5-a7c0-91802a7ef233/640x640/blur',
        'l': 'https://bandlabimages.azureedge.net/v1.0/users/e5623735-1f57-4ef5-a7c0-91802a7ef233/1024x1024/blur'
      },
      'color': '#3C4A55',
      'isDefault': false,
      'l': 'https://bandlabimages.azureedge.net/v1.0/users/e5623735-1f57-4ef5-a7c0-91802a7ef233/1024x1024',
      'm': 'https://bandlabimages.azureedge.net/v1.0/users/e5623735-1f57-4ef5-a7c0-91802a7ef233/640x640',
      'original': 'https://bandlabimages.azureedge.net/v1.0/users/e5623735-1f57-4ef5-a7c0-91802a7ef233/',
      's': 'https://bandlabimages.azureedge.net/v1.0/users/e5623735-1f57-4ef5-a7c0-91802a7ef233/360x360',
      'url': 'https://bandlabimages.azureedge.net/v1.0/users/e5623735-1f57-4ef5-a7c0-91802a7ef233/',
      'xs': 'https://bandlabimages.azureedge.net/v1.0/users/e5623735-1f57-4ef5-a7c0-91802a7ef233/100x100'
    },
    'username': 'sbsdasani'
  },
  'id': 'f5f04998635a44ea819cacdba7ae2076_f8d8574c3bdaec11b6562818783151a1',
  'isCommentingAllowed': true,
  'isExplicit': false,
  'isLiked': false,
  'permissions': {
    'comment': false,
    'delete': false,
    'edit': false
  },
  'revisionId': 'f7d8574c-3bda-ec11-b656-2818783151a1',
  'state': 'Public',
  'track': {
    'genreId': 'other',
    'isHiRes': false,
    'name': 'ON MY OWN (unreleased)',
    'permissions': {
      'download': true
    },
    'picture': {
      'blur': {
        'xs': 'https://bl-prod-images.azureedge.net/v1.3/tracks/1d2a78d9-f8e9-4928-9e73-46f010dbe360/100x100/blur',
        's': 'https://bl-prod-images.azureedge.net/v1.3/tracks/1d2a78d9-f8e9-4928-9e73-46f010dbe360/360x360/blur',
        'm': 'https://bl-prod-images.azureedge.net/v1.3/tracks/1d2a78d9-f8e9-4928-9e73-46f010dbe360/640x640/blur',
        'l': 'https://bl-prod-images.azureedge.net/v1.3/tracks/1d2a78d9-f8e9-4928-9e73-46f010dbe360/1024x1024/blur'
      },
      'color': '#595F6C',
      'isDefault': false,
      'l': 'https://bl-prod-images.azureedge.net/v1.3/tracks/1d2a78d9-f8e9-4928-9e73-46f010dbe360/1024x1024',
      'm': 'https://bl-prod-images.azureedge.net/v1.3/tracks/1d2a78d9-f8e9-4928-9e73-46f010dbe360/640x640',
      'original': 'https://bl-prod-images.azureedge.net/v1.3/tracks/1d2a78d9-f8e9-4928-9e73-46f010dbe360/',
      's': 'https://bl-prod-images.azureedge.net/v1.3/tracks/1d2a78d9-f8e9-4928-9e73-46f010dbe360/360x360',
      'url': 'https://bl-prod-images.azureedge.net/v1.3/tracks/1d2a78d9-f8e9-4928-9e73-46f010dbe360/',
      'xs': 'https://bl-prod-images.azureedge.net/v1.3/tracks/1d2a78d9-f8e9-4928-9e73-46f010dbe360/100x100'
    },
    'sample': {
      'audioFormat': 'm4a',
      'audioUrl': 'https://static.bandlab.com/revisions-formatted/6d1e0232-d7b4-4476-8c7a-e67900fbd8b0/6d1e0232-d7b4-4476-8c7a-e67900fbd8b0.m4a',
      'duration': 211.63,
      'status': 'Ready',
      'uploadUrl': null,
      'waveformUrl': 'https://static.bandlab.com/revisions-formatted/6d1e0232-d7b4-4476-8c7a-e67900fbd8b0/6d1e0232-d7b4-4476-8c7a-e67900fbd8b0.json'
    }
  },
  'type': 'Track'
}

The other page types work the same way: https://www.bandlab.com/api/v1.3/albums/dc26e307-e51f-ed11-95d7-002248452390 https://www.bandlab.com/api/v1.3/collections/20356f3f-8d3f-e811-80c3-00155d65202b

danyalasif commented 2 years ago

Hey dirkf, I'd like to give this a shot. Please assign it to me if it's still available. I'm setting up the project right now.

dirkf commented 2 years ago

Good luck!

dt-rush commented 2 years ago

Sorry @dirkf I had this tab open for days and didn't refresh to see you claimed it. I just finished the work and posted the PR here:

31206

danyalasif commented 2 years ago

@dt-rush Ah, it's okay. I just started working on it today on the weekend. You can take it then. :)

dt-rush commented 2 years ago

@danyalasif aaaand I tagged the wrong person to begin with lol. Cheers m8 :)

aiur-adept commented 3 months ago

Bandlab support has been implemented in #32881

dirkf commented 3 months ago

Please put the magic string Closes #31184 in the Description of your PR #32881.

aiur-adept commented 3 months ago

@dirkf done