So, I've registered a dev app on DA, and put the necessary client-id and client-secret into my config file, and even refresh the token every once in a while.
But lately, I've noticed this error popping up occasionally, which I've listed as the title.
Thing is, that it still downloads things just fine as far as I'm aware, but it makes me wonder if I have done something wrong with my config, or haven't updated it properly (I do check pip to see if anything needs updates every 5-7 days).
EDIT: My DA dev app is unpublished, so that is also a thing. Does it have to be officially published? Because it didn't seem to need it before.
Just for transparency, this is my DA string in my config:
"deviantart":
{
"refresh-token": "example",
"client-id": "example",
"client-secret": "example",
"flat": true,
"folders": false,
"journals": "html",
"mature": true,
"metadata": false,
"original": true,
"quality": 100,
"extra": true,
"wait-min": 0
},
EDIT: My DA dev app is unpublished, so that is also a thing. Does it have to be officially published? Because it didn't seem to need it before.
No, that does not matter. Unless they have changed something in the last days. Not likely, but their "Eclipse" redesign is still a work in progress, I think.
What you should probably add to the DeviantArt part of your config are the cookies and cookies-update options:
https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst#extractorcookies-update
https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst#extractorcookies
For the cookies.txt file in Netscape-compatible format:
You need to use a browser profile with one of the browser extensions linked below this sentence here, just open the required site, like DeviantArt, sign into your account, and then export the cookie file with the browser extension.
Chrom(e|ium):
https://chrome.google.com/webstore/detail/cookiestxt/njabckikapfpffapmjgojcnbfjonfjfg
Firefox:
https://addons.mozilla.org/en-US/firefox/addon/cookies-txt/
OR
https://addons.mozilla.org/en-US/firefox/addon/export-cookies-txt/
(You don't need a new browser profile or something, of course, if you don't mind one more extension in your normal browser profile, or already have one of those extensions above or others providing the same functionality.)
But lately, I've noticed this error popping up occasionally, which I've listed as the title.
It only pops up for single images/deviations and Scraps downloads, since the OAuth API can't be used for those and you have to be logged in to download the original files (if they are available).
Regular logins haven't been implemented yet, so you have to export your browser cookies and do it that way (see the comment above).
Additionally, the account those cookies are from must use the Eclipse design of the site, otherwise it won't work either (#509)
"The account those cookies are from must use the Eclipse design"
Ugh, I friggin' hate the Eclipse design... Oh well.
So, I've switched over to Eclipse and used Cookies-txt to export my cookies (apparently, export-cookies-txt doesn't work, when I click on the button, nothing happens; might be because my browser is Waterfox...)
How would the structure of adding cookies and cookies-update look in my config file, in the example I've given. I'm still very much a novice at this kind of thing.
Attached is a txt with the deviantart cookies I've copied from the master cookie list, exported after switching to Eclipse, but I usually use old DA instead of Eclipse, so hopefully that shouldn't affect the cookies, right?
Please don't post your cookies in a public "forum". That's kind of the same as telling everyone your username and password, and that might not be the best idea …
Your cookies file, as is, is not going to be accepted as a valid Netscape cookies.txt file because it is missing its "header". I'm also not sure if Python likes the #HttpOnly_… entries. You should create a new .txt file, put the following inside, and replace the missing values with the ones from your old DA.Cookies.txt file:
# Netscape HTTP Cookie File
.deviantart.com TRUE / TRUE 2145945600 auth_secure <auth_secure_value>
.deviantart.com TRUE / FALSE 1580157112 userinfo <userinfo value>
.deviantart.com TRUE / FALSE 1580157112 auth <auth value>
How would the structure of adding cookies and cookies-update look in my config file, in the example I've given. I'm still very much a novice at this kind of thing.
Concerning the config "layout": You need to create a new "cookies": entry, whose value is the filesystem path to your cookies.txt file:
"deviantart":
{
…
"extra": true,
"wait-min": 0,
"cookies": "C:\\path\\to\\cookies.txt"
},
(cookies-update is already enabled by default, but that would just be "cookies-update": true on another line)
but I usually use old DA instead of Eclipse, so hopefully that shouldn't affect the cookies, right?
No, that sadly doesn't work, as was discovered in #509. You could always create a secondary account and use its cookies, though.
Please don't post your cookies in a public "forum". That's kind of the same as telling everyone your username and password, and that might not be the best idea …
Thankfully, I have enough sense to have changed several important characters in my cookies. I can say that my user name isn't DAUSERNAME, for example, so I should be okay.
Your cookies file, as is, is not going to be accepted as a valid Netscape cookies.txt file because it is missing its "header".
I know, I saved a different txt file, since the one that was produced literally printed out ALL my cookies, and I just copied the relevant DA ones for clarity and privacy. I didn't know if the cookies had to be put into the config file directly, but now I know the redirect to the actual txt file is what's needed.
So, my config will look like
"deviantart":
{
…
"extra": true,
"wait-min": 0,
"cookies": "C: path to cookies.txt",
"cookies-update": true"
},
That should be good, right?
No, that sadly doesn't work, as was discovered in #509. You could always create a secondary account and use its cookies, though.
EDIT: So I've taken my cookies and put them in a simplified text file, using the perimeters you listed, and the error disappears.
Only thing is the continuing issue of DA encoding submissions post May 2019 which prevents original file download unless the artist sets it, but that's been an ongoing issue.
But this cookie thing, man. Hope that's added to the same page that details how to get DA Developer App info into the program.
Can you also include this message on the batch download (https://www.deviantart.com/shimoda7/gallery/all or similar)? I only can see it on the individual download (https://www.deviantart.com/shimoda7/art/The-Cut-562075260 or similar)
This message is only shown when necessary, i.e. for scraps and individual images. Everything else works fine without cookies.
Most helpful comment
No, that does not matter. Unless they have changed something in the last days. Not likely, but their "Eclipse" redesign is still a work in progress, I think.
What you should probably add to the DeviantArt part of your config are the
cookiesandcookies-updateoptions:https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst#extractorcookies-update
https://github.com/mikf/gallery-dl/blob/master/docs/configuration.rst#extractorcookies
For the cookies.txt file in Netscape-compatible format:
You need to use a browser profile with one of the browser extensions linked below this sentence here, just open the required site, like DeviantArt, sign into your account, and then export the cookie file with the browser extension.
Chrom(e|ium):
https://chrome.google.com/webstore/detail/cookiestxt/njabckikapfpffapmjgojcnbfjonfjfg
Firefox:
https://addons.mozilla.org/en-US/firefox/addon/cookies-txt/
OR
https://addons.mozilla.org/en-US/firefox/addon/export-cookies-txt/
(You don't need a new browser profile or something, of course, if you don't mind one more extension in your normal browser profile, or already have one of those extensions above or others providing the same functionality.)