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

[following/1.25.0] "No results" #3771

Closed
Shohreh opened this issue Mar 13, 2023 · 10 comments
Closed

[following/1.25.0] "No results" #3771

Shohreh opened this issue Mar 13, 2023 · 10 comments

Comments

@Shohreh
Copy link

Shohreh commented Mar 13, 2023

Hello,

Since Twitter seems to sometimes remove accounts people are following, I looked into downloading my list, which now stands around 170.

For some reason, gallery-dl gets nothing:

gallery-dl -g https://twitter.com/me/following
[twitter][info] Requesting guest token
[twitter][info] No results for https://twitter.com/me/following

What could I try?

Thank you.

@mikf
Copy link
Owner

mikf commented Mar 13, 2023

Login or provide cookies.

/following URLs seem to not return any results with just a guest token.

edit: You can change the output URL format with the users option.

@Shohreh
Copy link
Author

Shohreh commented Mar 13, 2023

Thanks. One better, but still NOK:

Saved login + password in %USERPROFILE%\gallery-dl.conf
gallery-dl -g https://twitter.com/me/following
[twitter][info] Logging in as me
[twitter][info] No results for https://twitter.com/me/following

@rautamiekka
Copy link
Contributor

Add the --verbose flag.

@Shohreh
Copy link
Author

Shohreh commented Mar 14, 2023

[gallery-dl][debug] Python 3.8.10 - Windows-7-6.1.7601-SP1
[gallery-dl][debug] requests 2.25.1 - urllib3 1.26.4
[gallery-dl][debug] Configuration Files ['%USERPROFILE%\\gallery-dl.conf']
[gallery-dl][debug] Starting UrlJob for 'https://twitter.com/me/following'
[twitter][debug] Using TwitterFollowingExtractor for 'https://twitter.com/me/following'
[twitter][info] Requesting guest token
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): api.twitter.com:443
[urllib3.connectionpool][debug] https://api.twitter.com:443 "POST /1.1/guest/activate.json HTTP/1.1" 200 63
[urllib3.connectionpool][debug] https://api.twitter.com:443 "GET /graphql/7mjxD3-C6BxitPMVQ6w0-Q/UserByScreenName?variables=%7B%22
screen_name%22%3A%22me%22%2C%22withSafetyModeUserFields%22%3Atrue%2C%22withSuperFollowsUserFields%22%3Atrue%7D HTTP/1.1
" 200 695
[urllib3.connectionpool][debug] https://api.twitter.com:443 "GET /graphql/mIwX8GogcobVlRwlgpHNYA/Following?variables=%7B%22userId%
22%3A%2233500208%22%2C%22count%22%3A100%2C%22includePromotedContent%22%3Afalse%2C%22withSuperFollowsUserFields%22%3Atrue%2C%22with
BirdwatchPivots%22%3Afalse%2C%22withDownvotePerspective%22%3Afalse%2C%22withReactionsMetadata%22%3Afalse%2C%22withReactionsPerspec
tive%22%3Afalse%2C%22withSuperFollowsTweetFields%22%3Atrue%2C%22withClientEventToken%22%3Afalse%2C%22withBirdwatchNotes%22%3Afalse
%2C%22withVoice%22%3Atrue%2C%22withV2Timeline%22%3Afalse%2C%22__fs_interactive_text%22%3Afalse%2C%22__fs_dont_mention_me_view_api_
enabled%22%3Afalse%7D HTTP/1.1" 200 265
[twitter][info] No results for https://twitter.com/me/following```

@mikf
Copy link
Owner

mikf commented Mar 15, 2023

Works for me. Try cookies if username & password don't work.

$ gallery-dl -g -u me twitter.com/potus/following
https://twitter.com/i/user/1323730225067339784
https://twitter.com/i/user/803694179079458816
https://twitter.com/i/user/1349154719386775552
https://twitter.com/i/user/1349175483989188608
https://twitter.com/i/user/1349170292564905988
https://twitter.com/i/user/1351293685493878786
https://twitter.com/i/user/42562446
https://twitter.com/i/user/1352064843432472578
https://twitter.com/i/user/1351302423273472012
https://twitter.com/i/user/1351341047394295808
https://twitter.com/i/user/1351284403801108481
https://twitter.com/i/user/1351311448195166208
https://twitter.com/i/user/1349389044426403847

@a84r7a3rga76fg
Copy link

@mikf Can gallery-dl convert username to user IDs and say which ones failed? It's cumbersome to be doing it one by one

@mikf
Copy link
Owner

mikf commented Mar 15, 2023

@a84r7a3rga76fg Not with its command-line interface. You can use its TwitterAPI code in your own script similar to #3623 (comment) and use user_by_screen_name and user_by_rest_id to convert between name and ID.

@Shohreh
Copy link
Author

Shohreh commented Mar 16, 2023

After opening the web page on Twitter with Chrome to make sure the cookies were there and fresh, I tried the following config file + command, still not working:

{
    "extractor": {
        "twitter": {
			"cookies": ["chromium"]
        }
    }
}

c:\>gallery-dl -c .\gallery-dl.cookies.conf -g -u ME --verbose https://twitter.com/ME/following
[gallery-dl][debug] Version 1.25.0
[gallery-dl][debug] Python 3.8.10 - Windows-7-6.1.7601-SP1
[gallery-dl][debug] requests 2.25.1 - urllib3 1.26.4
[gallery-dl][debug] Configuration Files ['.\\gallery-dl.cookies.conf']
[gallery-dl][debug] Starting UrlJob for 'https://twitter.com/ME/following'
[cookies][debug] Extracting cookies from C:\Users\ME\AppData\Local\Chromium\User Data\Default\Network\Cookies
[cookies][debug] Found local state file at 'C:\Users\ME\AppData\Local\Chromium\User Data\Local State'
[cookies][info] Extracted 46 cookies from chromium
[cookies][debug] cookie version breakdown: {'v10': 46, 'other': 0, 'unencrypted': 0}
[twitter][debug] Using TwitterFollowingExtractor for 'https://twitter.com/ME/following'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): api.twitter.com:443
[urllib3.connectionpool][debug] https://api.twitter.com:443 "GET /graphql/7mjxD3-C6BxitPMVQ6w0-Q/UserByScreenName?variables=%7B%22
screen_name%22%3A%22ME%22%2C%22withSafetyModeUserFields%22%3Atrue%2C%22withSuperFollowsUserFields%22%3Atrue%7D HTTP/1.1
" 200 573
[urllib3.connectionpool][debug] https://api.twitter.com:443 "GET /graphql/mIwX8GogcobVlRwlgpHNYA/Following?variables=%7B%22userId%
22%3A%2233500208%22%2C%22count%22%3A100%2C%22includePromotedContent%22%3Afalse%2C%22withSuperFollowsUserFields%22%3Atrue%2C%22with
BirdwatchPivots%22%3Afalse%2C%22withDownvotePerspective%22%3Afalse%2C%22withReactionsMetadata%22%3Afalse%2C%22withReactionsPerspec
tive%22%3Afalse%2C%22withSuperFollowsTweetFields%22%3Atrue%2C%22withClientEventToken%22%3Afalse%2C%22withBirdwatchNotes%22%3Afalse
%2C%22withVoice%22%3Atrue%2C%22withV2Timeline%22%3Afalse%2C%22__fs_interactive_text%22%3Afalse%2C%22__fs_dont_mention_me_view_api_
enabled%22%3Afalse%7D HTTP/1.1" 200 265
[twitter][info] No results for https://twitter.com/ME/following```

@ClosedPort22
Copy link
Contributor

Twitter also put the media timeline behind soft login gate. The next step would be to disable guest access to the endpoint, I guess.

@Shohreh
Copy link
Author

Shohreh commented Mar 17, 2023

Thanks. Hopefully, it has no unintented consequences.

If all else fails, an AutoIT script.

Didn't expect something apparently so obvious to be so involved. Thanks Twitter :-/

@mikf mikf closed this as completed Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants