Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bandcamp is broken #26681

Open
kvorobyov opened this issue Sep 23, 2020 · 9 comments · May be fixed by #26684
Open

Bandcamp is broken #26681

kvorobyov opened this issue Sep 23, 2020 · 9 comments · May be fixed by #26684

Comments

@kvorobyov
Copy link

@kvorobyov kvorobyov commented Sep 23, 2020

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2020.09.20
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar issues including closed ones

Verbose log

youtube-dl -v https://proper-t.bandcamp.com/album/the-project-ivy-part-2-beauty-sleep
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://proper-t.bandcamp.com/album/the-project-ivy-part-2-beauty-sleep']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] youtube-dl version 2020.09.20
[debug] Python version 3.8.5 (CPython) - macOS-10.15.6-x86_64-i386-64bit
[debug] exe versions: ffmpeg 4.3.1, ffprobe 4.3.1, rtmpdump 2.4
[debug] Proxy map: {}
[Bandcamp:album] the-project-ivy-part-2-beauty-sleep: Downloading webpage
WARNING: unable to extract title; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[download] Downloading playlist: the-project-ivy-part-2-beauty-sleep
[Bandcamp:album] playlist the-project-ivy-part-2-beauty-sleep: Collected 7 video ids (downloading 7 of them)
[download] Downloading video 1 of 7
[Bandcamp] beauty-sleep: Downloading webpage
ERROR: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/youtube_dl/YoutubeDL.py", line 797, in extract_info
    ie_result = ie.extract(url)
  File "/usr/local/lib/python3.8/site-packages/youtube_dl/extractor/common.py", line 532, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/lib/python3.8/site-packages/youtube_dl/extractor/bandcamp.py", line 196, in _real_extract
    self._sort_formats(formats)
  File "/usr/local/lib/python3.8/site-packages/youtube_dl/extractor/common.py", line 1359, in _sort_formats
    raise ExtractorError('No video formats found')
youtube_dl.utils.ExtractorError: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Description

Bandcamp links return error today

@mkrupczak3
Copy link

@mkrupczak3 mkrupczak3 commented Sep 26, 2020

Some example failure output:

[bobjoe@miho Of Mud and Mushrooms]$ youtube-dl --version
2020.09.20
[bobjoe@miho Of Mud and Mushrooms]$ youtube-dl https://davidszymanski.bandcamp.com/album/of-mud-and-mushrooms
[Bandcamp:album] of-mud-and-mushrooms: Downloading webpage
WARNING: unable to extract title; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[download] Downloading playlist: of-mud-and-mushrooms
[Bandcamp:album] playlist of-mud-and-mushrooms: Collected 2 video ids (downloading 2 of them)
[download] Downloading video 1 of 2
[Bandcamp] mud-light-refinery: Downloading webpage
ERROR: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[bobjoe@miho Of Mud and Mushrooms]$ youtube-dl --ignore-errors --verbose https://davidszymanski.bandcamp.com/album/of-mud-and-mushrooms 
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'--ignore-errors', u'--verbose', u'https://davidszymanski.bandcamp.com/album/of-mud-and-mushrooms']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.09.20
[debug] Python version 2.7.5 (CPython) - Linux-3.10.0-957.el7.x86_64-x86_64-with-centos-7.6.1810-Core
[debug] exe versions: ffmpeg 3.4.6, ffprobe 3.4.6
[debug] Proxy map: {}
[Bandcamp:album] of-mud-and-mushrooms: Downloading webpage
WARNING: unable to extract title; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[download] Downloading playlist: of-mud-and-mushrooms
[Bandcamp:album] playlist of-mud-and-mushrooms: Collected 2 video ids (downloading 2 of them)
[download] Downloading video 1 of 2
[Bandcamp] mud-light-refinery: Downloading webpage
ERROR: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 797, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 532, in extract
    ie_result = self._real_extract(url)
  File "/usr/lib/python2.7/site-packages/youtube_dl/extractor/bandcamp.py", line 196, in _real_extract
    self._sort_formats(formats)
  File "/usr/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 1359, in _sort_formats
    raise ExtractorError('No video formats found')
ExtractorError: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

[download] Downloading video 2 of 2
[Bandcamp] the-mushroom-song: Downloading webpage
ERROR: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/youtube_dl/YoutubeDL.py", line 797, in extract_info
    ie_result = ie.extract(url)
  File "/usr/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 532, in extract
    ie_result = self._real_extract(url)
  File "/usr/lib/python2.7/site-packages/youtube_dl/extractor/bandcamp.py", line 196, in _real_extract
    self._sort_formats(formats)
  File "/usr/lib/python2.7/site-packages/youtube_dl/extractor/common.py", line 1359, in _sort_formats
    raise ExtractorError('No video formats found')
ExtractorError: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

[download] Finished downloading playlist: of-mud-and-mushrooms
@mkrupczak3
Copy link

@mkrupczak3 mkrupczak3 commented Sep 26, 2020

Bump!

@Sharpieman20
Copy link

@Sharpieman20 Sharpieman20 commented Sep 26, 2020

Having same exact issue

@iamleot iamleot mentioned this issue Sep 27, 2020
5 of 5 tasks complete
@quinncomendant
Copy link

@quinncomendant quinncomendant commented Sep 28, 2020

I noticed the data structures in the Bandcamp HTML file have changed. I have a custom Bandcamp HTML parser (for extracting metadata to use for IDv3 tags) that stopped working at the same time that youtube-dl stopped working. It must have broke for the same reason.

Previously, album metadata was saved to a JS variable in a HTML <script> tag like this:

var TralbumData = { 
    …
};

Now, the same data has been moved inside the data-tralbum attribute of a script tag:

<script type="text/javascript"  …  data-tralbum="{ … }"  …  ></script>

The script tag contains several data- attributes, but the data-tralbum attribute is the one that contains the file URL links – it appears to me to contain the same data that was previously available in the TralbumData variable.

I don't have time to offer any help to update youtube-dl, but hopefully the above hints help someone who can help.

@akadaedalus
Copy link

@akadaedalus akadaedalus commented Sep 29, 2020

It's more than the metadata, it's looking for file formats and download URLs. That data has also been moved to a different data structure.

I tried a little bit to parse out the URLs and was able to identify them (search the source for mp3-128) but it needs more analysis to match files with their metadata, and possibly a more general solution for multiple file types.

@djvs
Copy link

@djvs djvs commented Oct 3, 2020

Basic working example in Ruby, which I just wrote to use until this is fixed here. Feel free to use for reference.


require 'curb'
require 'nokogiri'
require 'ostruct'
require 'pry'
require 'securerandom'
require 'json'
require 'id3lib'
require 'time'

def getnoko(curl_res)
  Nokogiri::HTML.parse(curl_res.body_str)
end

def gethref(str, domain)
  str.match(/^\//) ? "https://#{domain}#{str}" : str
end

url = ARGV[0].gsub("http://","https://")

puts url.inspect

page = getnoko(Curl.get(url))

mp3script = page.css('script').select{|x|x.to_html.include?('bcbits.com/stream')}

tralbum = mp3script[0].attr('data-tralbum')

manifest = JSON.parse(tralbum)

album = manifest['current']['title']
time = Time.parse(manifest['current']['release_date'])

tracks = manifest['trackinfo']

list = tracks.each_with_index do |x, i|
  title = x['title']
  url = x['file']['mp3-128']
  trackNum = i + 1
  filepath = trackNum.to_s.rjust(2, "0") + " - " + title.gsub(/[^,?a-zA-Z0-9 _'"-]/, '') + ".mp3"

  puts "Downloading #{title} to #{filepath} from #{url} ..."

  Curl::Easy.download(url, filepath)
  
  # Tag
  tag = ID3Lib::Tag.new(filepath)
  tag.title = title
  tag.artist = manifest['artist']
  tag.album = album
  tag.track = "#{trackNum}/#{tracks.count}"
  tag.year = time.year
  tag.update!
end
@JDCourtney1969
Copy link

@JDCourtney1969 JDCourtney1969 commented Oct 7, 2020

Hi. I'm just a spectator here - a heavy user of Bandcamp who has used a couple of programs and web sites to convert many Bandcamp tracks to WAV files. As of about a week ago, I am no longer able to produce large WAV files. Someone told me it has something to do with "youtube-dl"...? I am guessing it's a result of some changes made by people at Bandcamp....? Is anyone else aware of this and has anyone tried to address this? Either here, or in a different place (pull request?) on this site? I am very new to this site and am having trouble navigating. I'm just desperate to get this issue resolved. Can anyone please help, or tell me where to go to find help? Thank you!

@cleslie577
Copy link

@cleslie577 cleslie577 commented Oct 7, 2020

Having the same issue, hoping there's a fix soon!

@vberlier
Copy link

@vberlier vberlier commented Oct 8, 2020

Just letting everyone know that this pull request fixes the problem. If you want to download an entire album check out my comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

9 participants
You can’t perform that action at this time.