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

[Failed to execute script __main__] When I try to use Oauth for DA #1358

Closed
Galewin opened this issue Mar 6, 2021 · 4 comments
Closed

[Failed to execute script __main__] When I try to use Oauth for DA #1358

Galewin opened this issue Mar 6, 2021 · 4 comments
Labels

Comments

@Galewin
Copy link

Galewin commented Mar 6, 2021

I'm using the windows standalone version of gallery-DL, whenever I try to set up Oatuh for DA, I get this error

C:\Users\galew>D:\DA-RIP\gallery-dl.exe oauth:deviantart
Traceback (most recent call last):
  File "gallery_dl\__main__.py", line 20, in <module>
  File "gallery_dl\__init__.py", line 248, in main
  File "gallery_dl\job.py", line 187, in __init__
  File "gallery_dl\job.py", line 27, in __init__
  File "gallery_dl\extractor\__init__.py", line 150, in find
  File "gallery_dl\extractor\oauth.py", line 29, in __init__
  File "gallery_dl\extractor\common.py", line 64, in __init__
  File "gallery_dl\extractor\common.py", line 220, in _init_session
AttributeError: 'bool' object has no attribute 'lower'
[4320] Failed to execute script __main__

I'm using the latest revision

@mikf
Copy link
Owner

mikf commented Mar 6, 2021

The new browser option introduced in v1.17.0 clashes with the name of the existing oauth.browser option, and the config value lookup does some unfavorable things.

You can set the value of oauth.browser to "true" (or any other string value) as a workaround.

@mikf mikf added the bug label Mar 6, 2021
@Galewin
Copy link
Author

Galewin commented Mar 6, 2021

That's strange, oauth.browser was already set to true, by setting it to false, I was able to copy and paste the url and use get the token though...

Also, I have a question, I can't wrap my head around all the identifications possibilities of gallery DL. From what I could understand, you can use Oauth, you use login cookies for mature scraps and refresh tokens for "premium" content like watchers only pictures ?

Maybe I'm using inneficient methods for DA like Cookies are not needed with Oauth or something like that, but I'm not sure now...

@mikf mikf closed this as completed in 94faf8c Mar 6, 2021
@mikf
Copy link
Owner

mikf commented Mar 6, 2021

oauth.browser was already set to true

Probably from the default config file:

"oauth":
{
"browser": true,
"cache": true,
"port": 6414
},

From what I could understand, you can use Oauth, you use login cookies for mature scraps and refresh tokens for "premium" content like watchers only pictures ?

Yep, you use refresh tokens to access private or restricted content.
Usually that would be enough, but, because dA's API is incomplete, we need to access the regular website for scraps (/USER/gallery/scraps), and there it lists the mature-rated ones only when logged in, meaning you also need cookies for those.

@Galewin
Copy link
Author

Galewin commented Mar 6, 2021

Ha, I get it, thank you for the explanation !

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

No branches or pull requests

2 participants