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

Redownloading purchased albums is broken #46

Open
quad opened this issue Dec 15, 2024 · 0 comments
Open

Redownloading purchased albums is broken #46

quad opened this issue Dec 15, 2024 · 0 comments

Comments

@quad
Copy link

quad commented Dec 15, 2024

redownload_url is an empty string now.

There's a new endpoint to get the data: https://bandcamp.com/api/orderhistory/1/get_items


quad@bedok:~/media/Music/bandcamp$ uvx --from git+https://github.com/easlice/bandcamp-downloader bandcamp-downloader.py --cookies cookies.sqlite --format flac --include-hidden --filename-format '{artist}/{item_id} - {artist} - {title}' quad 
 Updated https://github.com/easlice/bandcamp-downloader (0479958)
Installed 11 packages in 115ms
Traceback (most recent call last):
  File "/home3/quad/.cache/uv/archive-v0/6bhx8g8VqomwGk_DsM3f4/bin/bandcamp-downloader.py", line 593, in <module>
    sys.exit(main())
  File "/home3/quad/.cache/uv/archive-v0/6bhx8g8VqomwGk_DsM3f4/bin/bandcamp-downloader.py", line 188, in main
    items = get_items_for_user(args.username, args.include_hidden)
  File "/home3/quad/.cache/uv/archive-v0/6bhx8g8VqomwGk_DsM3f4/bin/bandcamp-downloader.py", line 288, in get_items_for_user
    items = merge_items_and_urls(items.values(), data['collection_data']['redownload_urls'])
  File "/home3/quad/.cache/uv/archive-v0/6bhx8g8VqomwGk_DsM3f4/bin/bandcamp-downloader.py", line 339, in merge_items_and_urls
    CONFIG['TQDM'].write("WARN: couldn't find redownload URL for item_id:[{}], artist:[{}], title:[{}]".format(
AttributeError: 'NoneType' object has no attribute 'write'

I added some debugging code to dump data and here's a part of what I got:

{'active_tab': 'collection',
 'app_store_url': 'https://itunes.apple.com/us/app/bandcamp/id706408639?mt=8',
 'cfg': {'artist_subscriptions': True,
         'community': True,
         'fan_collection_also_collected_counts': True,
         'fan_collection_also_collected_expand': True,
         'fan_page_2017': True,
         'fan_signup_use_captcha': True,
         'genre_management': True,
         'gift_cards': True,
         'gifting': True,
         'header_rework_2018': True,
         'login_use_captcha': True,
         'menubar_autocomplete_enabled': True,
         'mobile_download_fix': True,
         'mobile_onboarding': True,
         'new_search_api_service': True,
         'open_signup': True,
         'order_history': True,
         'search_discovery_one_filter_desktop_only': True,
         'search_discovery_one_filter_rollout': True,
         'search_tracking': True,
         'single_sign_up': True,
         'use_elasticsearch_backed_search': True},
 'collection_count': 408,
 'collection_data': {'batch_size': 20,
                     'collectors': {},
                     'hidden_items_count': 0,
                     'item_count': 408,
                     'last_token': '1724096766:300764481:a::',
                     'pending_sequence': [],
                     'purchase_infos': {},
                     'redownload_urls': {},
                     'sequence': ['a1204527868',
                                  'a4129255005',
                                  'a1158202580',
                                  'a3036801254',
                                  'a2780104035',
                                  'a2476919114',
                                  'a1345641741',
                                  'a1809073217',
                                  'a2163295041',
                                  'a82585090',
                                  'a1636962097',
                                  'a4237016429',
                                  'a4026962451',
                                  'a3041867588',
                                  'a1604400462',
                                  'a453935679',
                                  'a397431580',
                                  'a4219789451',
                                  'a1943531797',
                                  'a300764481'],
                     'small_collection': False,
                     'small_wishlist': False},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant