mikf / gallery-dl

Command-line program to download image galleries and collections from several image hosting sites
GNU General Public License v2.0
11.7k stars 953 forks source link

[twitter][warning] cookies: too many values to unpack (expected 7) #3727

Closed Kavolc closed 1 year ago

Kavolc commented 1 year ago

I don't know what happened but my Twitter cookies doesn't work anymore, I've tried to make the process again adding the .txt to the config file but didn't work. Im using termux on android, gallery-dl version 1.24.5 I get the cookies using kiwi browser and get cookies.txt extension. It works for other sites like Instagram, pixiv and I used to work for twitter.

NSFW:

gallery-dl  https://mobile.twitter.com/chunmomo0127/status/1625487964695597059
[twitter][warning] cookies: too many values to unpack (expected 7)
[twitter][warning] "Age-restricted adult content. This content might not be appropriate for people under 18 years old. To view this media, you’ll need to log in to Twitter. Learn more"
[twitter][info] No results for https://mobile.twitter.com/chunmomo0127/status/1625487964695597059
Syampuuh commented 1 year ago

Do not use the getcookies.txt extension, it is compromised. https://github.com/ytdl-org/youtube-dl/issues/31465

mikf commented 1 year ago

https://github.com/mikf/gallery-dl/issues/3700#issuecomment-1445164698 get-cookies.txt now writes 8 instead of the standard and expected 7 items per cookie, so you have to tweak its settings to make it work.

but you should not be using it in the first place, as Syampuuh said.

Kavolc commented 1 year ago

Damn, thank you for the advice. I will change my passwords.

So what other option do I have if I am on android to use cookies and put them in the config ?

viceroycowboy commented 1 year ago

#3700 (comment) get-cookies.txt now writes 8 instead of the standard and expected 7 items per cookie, so you have to tweak its settings to make it work.

but you should not be using it in the first place, as Syampuuh said.

Oh god, thank you!

phere-x commented 1 year ago

So what do we use?

mikf commented 1 year ago

PSA: The "Get Cookies TXT" extension was recently marked as Malware and sent ALL cookies to the developer (#3749)


An alternative might be Open Cookies.txt, but the linked Github repo with its source code is no longer available, so I personally wouldn't trust this either.

edit:

Anybody looking for a replacement extension might find Get cookies.txt LOCALLY to be a suitable replacement - it's open source, Manifest V3-compatible, and very lean. (Thank you to /u/GoastRiter for the link!)

rautamiekka commented 1 year ago

It looks like I can't use termux anymore...

How come ?

Kavolc commented 1 year ago

@rautamiekka I use termux for gallery-dl, and most sites require login with cookies. That extension was the only option I have since the --cookies-from-browser didn't work for me. I've been looking for alternatives to get cookies on mobile without luck.

rautamiekka commented 1 year ago

Where did you get termux from and how does the inability appear ?

Kavolc commented 1 year ago

I got it from Fdroid. This is the verbose I got: gallery-dl --cookies-from-browser chrome URL [twitter][warning] cookies: Unable to find chrome cookies database in '/data/data/com.termux/files/home/.config/google-chrome/'

I don't know if I could put the cookies in that directory without root or how that works exactly.

mikf commented 1 year ago

I have no idea how someone could come to https://github.com/mikf/gallery-dl/issues/3727#issuecomment-1462897402 as a conclusion from what I posted in https://github.com/mikf/gallery-dl/issues/3727#issuecomment-1462705089, but whatever.

What about one of these methods?