Danbooru Downloader 20120428 (Updated)

Change log:

  • Fix absolute path in download batch.
  • Add form for updating tags.xml.
  • Update json parser.
  • Fix unhandled ‘root element missing’ exception when downloading list.
  • Fix remove .!tmp when download success (20120428)

Screenshots:

Main Tab
Main Tab
Download Tab
Download Tab
Full Batch Tab
Full Batch Tab
Settings Tab
Settings Tab
Log Tab
Log Tab
Provider Dialog
Provider Dialog
Add Batch Job Dialog
Add Batch Job Dialog
Update Tags.xml Dialog
Update Tags.xml Dialog

Download link here here, source code in GitHub.

38 thoughts on “Danbooru Downloader 20120428 (Updated)”

  1. Wow, thanks for this! Helps save a lot of time when trying to save last minute references before dashing off somewhere 😛

    But I can’t seem to get it to work, I’ll take screenshots… This is what happens when I click “Get”: http://puu.sh/smdK
    My settings: http://puu.sh/smdX
    I’ve tried “Full Batch Mode” and it seems to work but when I go look there aren’t any files. :C

    If you could help I would be eternally grateful! This really is a great and useful project!

      1. Hum, I just tried again and it seems to work now? Perhaps the site was down for a while, probably should have checked that. xD; Thanks anyway!

      2. Or so I thought, it doesn’t save them the way I want them to be; it saves them only with the md5 tag, even though I set the filename format to be %artist%%tags%-%md5%. At least it saves them, though.

        Would you still like to look at the logs? I think the problem isn’t that big of a deal, I do like knowing the artist but if it can’t be helped.
        I know that I’ve had a little trouble with safebooru separating the artist from the other tags, I’m wondering if that’s the problem? However I have gotten it to work before with the Firefox addon, for example (I don’t use Firefox anymore though). I’ll try it with another site tomorrow when it’s not so late and I can think of a safe tag to deal with haha;

      3. One more thing to add; I just noticed that some of them have a ‘-‘ in front of them, for example -2dfa909d770417db2e7f102a7660706b.jpg, so I would assume it is having trouble getting the artist tag and so it’s just not putting it there? I had a ‘-‘ separating the artist and the md5 tag.
        …oh and I just realized in my previous comment I put %tags%-%md5%, but it was %artist% instead of %tags%. Careless copy pasting haha; I was checking to see if that had better results.

        Anyway, I’ll see what I can do. I’ll think of solutions, thanks much xD;

        1. >> it is having trouble getting the artist tag and so it’s just not putting it there?
          Yup, if there is no artist tags found, then it will be empty. Maybe you can download the tags.xml from safebooru, because the default one is from danbooru.

  2. I have a suggestion that will avoid duplicate files in the future.
    This happens a lot, I have 2 images that are exactly the same but the only difference is that one is .jpg and the other one is .jpeg. Could you make it so that .jpeg get renamed to .jpg and then check if the files exists? This will avoid most if not all of the duplicate files.

    1. probably because of the target filename is already exists, better use %md5% in the filename format. it will make the filename unique, except if the file is a duplicate.

  3. when i search konachan and yande , the program will search some picture deleted, and will display blank ,
    when program down to this blank, the program will error,
    if i need this continue i must delete this blank,
    but often too many picture deleted.
    i hope the program ignore that.

    my english is so so ….i hope you can understand

        1. it is because the post is already deleted, so no file_url available. For now, you can only skip those post.

          I will add filter for already deleted post in the next release.

  4. Thanks for the update. This version is working unlike the previous one however I cannot update the tags file from Sankaku, I get a long error.

    1. ************** Exception Text **************
      System.Xml.XmlException: Root element is missing.
      at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
      at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
      at System.Xml.XmlReader.MoveToContent()
      at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderDanbooruTagCollection.Read5_tags()

      ************** Loaded Assemblies **************
      mscorlib
      Assembly Version: 4.0.0.0
      Win32 Version: 4.0.30319.261 (RTMGDR.030319-2600)
      CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
      —————————————-
      DanbooruDownloader3
      Assembly Version: 3.2012.4.28
      Win32 Version: 3.2012.04.28
      CodeBase: file:///C:/Users/Administrator/Desktop/DanbooruDownloader20120428/DanbooruDownloader3.exe
      —————————————-
      System.Windows.Forms
      Assembly Version: 4.0.0.0
      Win32 Version: 4.0.30319.235 built by: RTMGDR
      CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
      —————————————-
      System.Drawing
      Assembly Version: 4.0.0.0
      Win32 Version: 4.0.30319.276 built by: RTMGDR
      CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
      —————————————-
      System
      Assembly Version: 4.0.0.0
      Win32 Version: 4.0.30319.261 built by: RTMGDR
      CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
      —————————————-
      System.Configuration
      Assembly Version: 4.0.0.0
      Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
      CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
      —————————————-
      System.Xml
      Assembly Version: 4.0.0.0
      Win32 Version: 4.0.30319.233 built by: RTMGDR
      CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
      —————————————-
      Accessibility
      Assembly Version: 4.0.0.0
      Win32 Version: 4.0.30319.1 built by: RTMRel
      CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
      —————————————-
      System.Core
      Assembly Version: 4.0.0.0
      Win32 Version: 4.0.30319.233 built by: RTMGDR
      CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
      —————————————-
      2s0v1lgx
      Assembly Version: 3.2012.4.28
      Win32 Version: 4.0.30319.261 built by: RTMGDR
      CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
      —————————————-

      1. Can you check the downloaded tags.xml? probably the downloaded file is corrupted/incomplete. It should be around 19027KB.

    1. The error is because the directory detection in the MakeFilename method. For now, you can avoid it by putting the target path in the Save Folder in the Download Tab (e.g: C:Download) or in the filename format (C:Download%artist% – %copyright% ….)

  5. [DoBatchJob] Error: Length cannot be less than zero.
    Parameter name: length
    Stack Trace:
    at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
    at DanbooruDownloader3.Helper.MakeFilename(String baseFolder, String format, DanbooruPost post, Int32 limit)
    at DanbooruDownloader3.FormMain.DoBatchJob(BindingList`1 batchJob)

    ……. batch mode…can’t download when finished count page

  6. Another comment…to clarify the “.!tmp” error applies to all providers. Also, now that I have searched a larger gallery, I have noticed that pages are not auto-loading despite the auto-load boxes being ticked. Just FYI.

    1. >> .!tmp
      forgot to rename back :), fixed here

      >> Auto loading next page
      it is working in my place, maybe there is no next page? can you give the query you are using?

      1. Maybe functionality has changed since I last used the program, but when the query is “tags=fuyu” on danbooru, only the first twenty items are listed and you must scroll to load the rest of the pages.

        It’s inconsequential in any case, as I just remembered you can load all the images by setting the limit to a very high number.

        The update works great though, thanks for the quick fix.

        1. >> only the first twenty items are listed and you must scroll to load the rest of the pages.
          that the expected behavior 🙂

          >> It’s inconsequential in any case, as I just remembered you can load all the images by setting the limit to a very high number.
          true

  7. Sorry for leaving so many messages…but now that I have it working again, everything is being saved as a “.!tmp” file. They can easily be renamed and turned into image files, but it is a tedious process…do you know why this is happening?

  8. Disregard that last comment, I fail to read readmes. I got around the 503 error.

  9. I keep getting the error “The remote server returned an error: (403) Forbidden.”

    I do not believe this is normal behavior…just thought I’d mention it. Thanks though!

Comments are closed.