Ezwen / bandcamp-collection-downloader

A command-line tool to automatically download all releases purchased with a Bandcamp account. The official page of the project is https://framagit.org/Ezwen/bandcamp-collection-downloader, while here this is just a mirror hosted on Github.
GNU Affero General Public License v3.0
245 stars 23 forks source link

Throws many exceptions, only retrieves half of collection #8

Closed CoryAlbrecht closed 4 years ago

CoryAlbrecht commented 4 years ago

When I run the jar, I get many exceptions and only about half the files get downloaded.

cory@redbarchetta[15:55:53]~/Development/Personal/BitBucket/Git/Ezwen/bandcamp-collection-downloader$ java -jar ./build/libs/bandcamp-collection-downloader.jar  --download-folder=/nfs/twilightsparkle/mnt/Archives/home/cory/Music/Bandcamp2 -f flac --cookies-file=./cookies.json  bytor
Target bandcamp account: bytor
Target download folder: /nfs/twilightsparkle/mnt/Archives/home/cory/Music/Bandcamp2
Target audio format: flac
------------
Loading provided cookies file…
Loaded cookies from: ./cookies.json
------------
Connecting to Bandcamp…
Found "bytor's collection | Bandcamp" with 30 items.
------------
[pool-1-thread-1] Managing item 1/30
[pool-1-thread-2] Managing item 2/30
[pool-1-thread-4] Managing item 4/30
[pool-1-thread-3] Managing item 3/30
[pool-1-thread-1] Found release "Songs of the Month & Singles" by Marian Call.
[pool-1-thread-4] Found release "TRUDBOL A CAPPELLA" by Julien Neel.
Exception in thread "pool-1-thread-1" [pool-1-thread-5] Managing item 5/30
java.lang.NullPointerException: text
    at java.base/java.util.Objects.requireNonNull(Objects.java:246)
    at java.base/java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1945)
    at java.base/java.time.ZonedDateTime.parse(ZonedDateTime.java:598)
    at bandcampcollectiondownloader.BandcampCollectionDownloader.manageDownloadPage(BandcampCollectionDownloader.kt:121)
    at bandcampcollectiondownloader.BandcampCollectionDownloader.access$manageDownloadPage(BandcampCollectionDownloader.kt:13)
    at bandcampcollectiondownloader.BandcampCollectionDownloader$downloadAll$task$1.run(BandcampCollectionDownloader.kt:87)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
[pool-1-thread-3] Found release "Blatant Pandering" by The Doubleclicks.
[pool-1-thread-2] Found release "American Brunch" by The Buttertones.
[pool-1-thread-5] Found release "Weekly Song Wednesday" by The Doubleclicks.
[pool-1-thread-3] Starting the download of "Blatant Pandering" by The Doubleclicks.
[pool-1-thread-2] Starting the download of "American Brunch" by The Buttertones.
[pool-1-thread-4] Starting the download of "TRUDBOL A CAPPELLA" by Julien Neel.
[pool-1-thread-5] Starting the download of "Weekly Song Wednesday" by The Doubleclicks.
[pool-1-thread-3] "Blatant Pandering" by The Doubleclicks successfully downloaded.
[pool-1-thread-3] Managing item 6/30
[pool-1-thread-3] Found release "Lasers and Feelings" by The Doubleclicks.
[pool-1-thread-3] Starting the download of "Lasers and Feelings" by The Doubleclicks.
[pool-1-thread-2] "American Brunch" by The Buttertones successfully downloaded.
[pool-1-thread-2] Managing item 7/30
[pool-1-thread-2] Found release "The Doubleclicks Coloring and Activity Book" by The Doubleclicks.
[pool-1-thread-2] Starting the download of "The Doubleclicks Coloring and Activity Book" by The Doubleclicks.
[pool-1-thread-2] "The Doubleclicks Coloring and Activity Book" by The Doubleclicks successfully downloaded.
[pool-1-thread-2] Managing item 8/30
[pool-1-thread-2] Found release "Love Problems" by The Doubleclicks.
[pool-1-thread-2] Starting the download of "Love Problems" by The Doubleclicks.
[pool-1-thread-5] "Weekly Song Wednesday" by The Doubleclicks successfully downloaded.
[pool-1-thread-5] Managing item 9/30
[pool-1-thread-5] Found release "Christmas Ain't About Me" by The Doubleclicks.
[pool-1-thread-5] Starting the download of "Christmas Ain't About Me" by The Doubleclicks.
[pool-1-thread-5] "Christmas Ain't About Me" by The Doubleclicks successfully downloaded.
[pool-1-thread-5] Managing item 10/30
[pool-1-thread-5] Found release "Song Fu 2012" by The Doubleclicks.
[pool-1-thread-5] Starting the download of "Song Fu 2012" by The Doubleclicks.
[pool-1-thread-4] "TRUDBOL A CAPPELLA" by Julien Neel successfully downloaded.
[pool-1-thread-4] Managing item 11/30
[pool-1-thread-4] Found release "President Snakes" by The Doubleclicks.
[pool-1-thread-4] Starting the download of "President Snakes" by The Doubleclicks.
[pool-1-thread-2] "Love Problems" by The Doubleclicks successfully downloaded.
[pool-1-thread-2] Managing item 12/30
[pool-1-thread-3] "Lasers and Feelings" by The Doubleclicks successfully downloaded.
[pool-1-thread-3] Managing item 13/30
[pool-1-thread-2] Found release "Weekly Song Wednesday: Season 2" by The Doubleclicks.
[pool-1-thread-3] Found release "Dimetrodon" by The Doubleclicks.
[pool-1-thread-2] Starting the download of "Weekly Song Wednesday: Season 2" by The Doubleclicks.
[pool-1-thread-3] Starting the download of "Dimetrodon" by The Doubleclicks.
[pool-1-thread-5] "Song Fu 2012" by The Doubleclicks successfully downloaded.
[pool-1-thread-5] Managing item 14/30
[pool-1-thread-5] Found release "Chainmail and Cello" by The Doubleclicks.
[pool-1-thread-5] Starting the download of "Chainmail and Cello" by The Doubleclicks.
[pool-1-thread-2] "Weekly Song Wednesday: Season 2" by The Doubleclicks successfully downloaded.
[pool-1-thread-2] Managing item 15/30
[pool-1-thread-2] Found release "Sketchbook" by Marian Call.
[pool-1-thread-2] Starting the download of "Sketchbook" by Marian Call.
[pool-1-thread-4] "President Snakes" by The Doubleclicks successfully downloaded.
[pool-1-thread-4] Managing item 16/30
[pool-1-thread-4] Found release "Anchorage" by Marian Call.
Exception in thread "pool-1-thread-4" java.lang.NullPointerException: text
[pool-1-thread-6] Managing item 17/30
    at java.base/java.util.Objects.requireNonNull(Objects.java:246)
    at java.base/java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1945)
    at java.base/java.time.ZonedDateTime.parse(ZonedDateTime.java:598)
    at bandcampcollectiondownloader.BandcampCollectionDownloader.manageDownloadPage(BandcampCollectionDownloader.kt:121)
    at bandcampcollectiondownloader.BandcampCollectionDownloader.access$manageDownloadPage(BandcampCollectionDownloader.kt:13)
    at bandcampcollectiondownloader.BandcampCollectionDownloader$downloadAll$task$1.run(BandcampCollectionDownloader.kt:87)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
[pool-1-thread-6] Found release "Love and Harmony (without vocals)" by Marian Call.
Exception in thread "pool-1-thread-6" java.lang.NullPointerException: text
[pool-1-thread-7] Managing item 18/30
    at java.base/java.util.Objects.requireNonNull(Objects.java:246)
    at java.base/java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1945)
    at java.base/java.time.ZonedDateTime.parse(ZonedDateTime.java:598)
    at bandcampcollectiondownloader.BandcampCollectionDownloader.manageDownloadPage(BandcampCollectionDownloader.kt:121)
    at bandcampcollectiondownloader.BandcampCollectionDownloader.access$manageDownloadPage(BandcampCollectionDownloader.kt:13)
    at bandcampcollectiondownloader.BandcampCollectionDownloader$downloadAll$task$1.run(BandcampCollectionDownloader.kt:87)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
[pool-1-thread-7] Found release "Song-a-week (Demos)" by The Doubleclicks.
[pool-1-thread-7] Starting the download of "Song-a-week (Demos)" by The Doubleclicks.
[pool-1-thread-5] "Chainmail and Cello" by The Doubleclicks successfully downloaded.
[pool-1-thread-5] Managing item 19/30
[pool-1-thread-5] Found release "The Same Old Songs, But Live" by Molly Lewis.
[pool-1-thread-5] Starting the download of "The Same Old Songs, But Live" by Molly Lewis.
[pool-1-thread-3] "Dimetrodon" by The Doubleclicks successfully downloaded.
[pool-1-thread-3] Managing item 20/30
[pool-1-thread-3] Found release "Love and Harmony" by Marian Call.
Exception in thread "pool-1-thread-3" java.lang.NullPointerException: text
[pool-1-thread-8] Managing item 21/30
    at java.base/java.util.Objects.requireNonNull(Objects.java:246)
    at java.base/java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1945)
    at java.base/java.time.ZonedDateTime.parse(ZonedDateTime.java:598)
    at bandcampcollectiondownloader.BandcampCollectionDownloader.manageDownloadPage(BandcampCollectionDownloader.kt:121)
    at bandcampcollectiondownloader.BandcampCollectionDownloader.access$manageDownloadPage(BandcampCollectionDownloader.kt:13)
    at bandcampcollectiondownloader.BandcampCollectionDownloader$downloadAll$task$1.run(BandcampCollectionDownloader.kt:87)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
[pool-1-thread-8] Found release "The Book was Better" by The Doubleclicks.
[pool-1-thread-8] Starting the download of "The Book was Better" by The Doubleclicks.
[pool-1-thread-2] "Sketchbook" by Marian Call successfully downloaded.
[pool-1-thread-2] Managing item 22/30
[pool-1-thread-2] Found release "You Should Write A Song About That" by The Doubleclicks.
[pool-1-thread-2] Starting the download of "You Should Write A Song About That" by The Doubleclicks.
[pool-1-thread-7] "Song-a-week (Demos)" by The Doubleclicks successfully downloaded.
[pool-1-thread-7] Managing item 23/30
[pool-1-thread-7] Found release "Worst Superpower Ever" by The Doubleclicks.
[pool-1-thread-7] Starting the download of "Worst Superpower Ever" by The Doubleclicks.
[pool-1-thread-5] "The Same Old Songs, But Live" by Molly Lewis successfully downloaded.
[pool-1-thread-5] Managing item 24/30
[pool-1-thread-5] Found release "Beta Testing 1-2-3" by The Doubleclicks.
[pool-1-thread-5] Starting the download of "Beta Testing 1-2-3" by The Doubleclicks.
[pool-1-thread-7] "Worst Superpower Ever" by The Doubleclicks successfully downloaded.
[pool-1-thread-7] Managing item 25/30
[pool-1-thread-7] Found release "Fun Singles in Your Area" by Marian Call.
[pool-1-thread-7] Starting the download of "Fun Singles in Your Area" by Marian Call.
[pool-1-thread-2] "You Should Write A Song About That" by The Doubleclicks successfully downloaded.
[pool-1-thread-2] Managing item 26/30
[pool-1-thread-2] Found release "Good Morning Moon" by Marian Call.
Exception in thread "pool-1-thread-2" java.lang.NullPointerException: text[pool-1-thread-9] Managing item 27/30

    at java.base/java.util.Objects.requireNonNull(Objects.java:246)
    at java.base/java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1945)
    at java.base/java.time.ZonedDateTime.parse(ZonedDateTime.java:598)
    at bandcampcollectiondownloader.BandcampCollectionDownloader.manageDownloadPage(BandcampCollectionDownloader.kt:121)
    at bandcampcollectiondownloader.BandcampCollectionDownloader.access$manageDownloadPage(BandcampCollectionDownloader.kt:13)
    at bandcampcollectiondownloader.BandcampCollectionDownloader$downloadAll$task$1.run(BandcampCollectionDownloader.kt:87)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
[pool-1-thread-8] "The Book was Better" by The Doubleclicks successfully downloaded.
[pool-1-thread-8] Managing item 28/30
[pool-1-thread-9] Found release "Some Christmas Songs" by The Doubleclicks.
[pool-1-thread-8] Found release "Various Singles" by The Doubleclicks.
[pool-1-thread-8] Starting the download of "Various Singles" by The Doubleclicks.
[pool-1-thread-9] Starting the download of "Some Christmas Songs" by The Doubleclicks.
[pool-1-thread-9] "Some Christmas Songs" by The Doubleclicks successfully downloaded.
[pool-1-thread-9] Managing item 29/30
[pool-1-thread-9] Found release "The Caves" by The Sevateem.
[pool-1-thread-9] Starting the download of "The Caves" by The Sevateem.
[pool-1-thread-7] "Fun Singles in Your Area" by Marian Call successfully downloaded.
[pool-1-thread-7] Managing item 30/30
[pool-1-thread-7] Found release "Cuss!" by Marian Call.
[pool-1-thread-7] Starting the download of "Cuss!" by Marian Call.
[pool-1-thread-5] "Beta Testing 1-2-3" by The Doubleclicks successfully downloaded.
[pool-1-thread-7] "Cuss!" by Marian Call successfully downloaded.
[pool-1-thread-8] "Various Singles" by The Doubleclicks successfully downloaded.
[pool-1-thread-9] "The Caves" by The Sevateem successfully downloaded.
CoryAlbrecht commented 4 years ago

This appears to be because digitalItem.package_release_date can be null for some items

Ezwen commented 4 years ago

It seems we discover new surprises every year with the bandcamp database :). Thanks for the report, your PR #9 should fix the problem when merged.