-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Twitter KeyError: 'user' --versbose #891
Comments
Are you sure that is the correct twitter username? I've checked for the user "@heythisispaty" and it comes back and says the user doesn't exist.
|
Hello beakwood,
beakwood writes:
I'm following the profile and it's also public. I can't grab anything (even logged in) and receive this error when trying to do so.
[gallery-dl][debug] Starting DownloadJob for 'https://twitter.com/heythisispaty/media'
[twitter][debug] Using TwitterMediaExtractor for 'https://twitter.com/heythisispaty/media'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): api.twitter.com:443
[urllib3.connectionpool][debug] https://api.twitter.com:443 "GET /graphql/-xfUfZsnR_zqjFd-IfrN5A/UserByScreenName?variables=%7B%22screen_name%22%3A%22heythisispaty%22%2C%22withHighlightedLabel%22%3Atrue%7D HTTP/1.1" 200 157
[twitter][error] An unexpected error occurred: KeyError - 'user'. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[...]
Is there maybe a typo in the username? It seems that the page does not
exists on mobile.twitter.com and also the corresponding response via
`gallery-dl --write-pages' has a `Not found' error message.
|
Apologies, I was looking at it working lol. Yes, it was punctual incorrection. Thanks. |
It would be great if it also logged the username like before, I'm using a list with hundreds of users in it and it would help with cleaning up. |
What do you mean? Log settings? Output directory option? |
In earlier versions of gallery-dl, the logs would include which line/url in a list file is causing errors, which usually indicates a non-existent or removed user. This no longer seems to be the case, or I'm just missing something. |
Not sure which earlier versions of gallery-dl you mean here, but this should indeed be possible. With something like this for the logging configuration: "output":
{
"mode": "auto",
"progress": true,
"shorten": true,
"log": "[{name}][{levelname}] {message}",
"logfile": {
"level": "info",
"format": {
"debug" : "D: {asctime} [{name}][{levelname}] {message}",
"info" : "I: {asctime} [{name}][{levelname}] {message}",
"warning": "W: {asctime} [{name}][{levelname}] {message}",
"error" : "E: {asctime} [{name}][{levelname}] {message} Error-URL: {extractor.url}"
},
"format-date": "%H:%M:%S",
"path": "~/log.txt",
"encoding": "utf-8",
"mode": "a"
},
"unsupportedfile": null
}, The options set here (i.e. the |
I'm following the profile and it's also public. I can't grab anything (even logged in) and receive this error when trying to do so.
[gallery-dl][debug] Starting DownloadJob for 'https://twitter.com/heythisispaty/media'
[twitter][debug] Using TwitterMediaExtractor for 'https://twitter.com/heythisispaty/media'
[urllib3.connectionpool][debug] Starting new HTTPS connection (1): api.twitter.com:443
[urllib3.connectionpool][debug] https://api.twitter.com:443 "GET /graphql/-xfUfZsnR_zqjFd-IfrN5A/UserByScreenName?variables=%7B%22screen_name%22%3A%22heythisispaty%22%2C%22withHighlightedLabel%22%3Atrue%7D HTTP/1.1" 200 157
[twitter][error] An unexpected error occurred: KeyError - 'user'. Please run gallery-dl again with the --verbose flag, copy its output and report this issue on https://github.com/mikf/gallery-dl/issues .
[twitter][debug]
Traceback (most recent call last):
File "c:\python38\lib\site-packages\gallery_dl\job.py", line 61, in run
for msg in self.extractor:
File "c:\python38\lib\site-packages\gallery_dl\extractor\twitter.py", line 43, in items
for tweet in self.tweets():
File "c:\python38\lib\site-packages\gallery_dl\extractor\twitter.py", line 265, in tweets
return TwitterAPI(self).timeline_media(self.user)
File "c:\python38\lib\site-packages\gallery_dl\extractor\twitter.py", line 447, in timeline_media
user = self.user_by_screen_name(screen_name)
File "c:\python38\lib\site-packages\gallery_dl\extractor\twitter.py", line 477, in user_by_screen_name
return self._call(endpoint, params)["data"]["user"]
KeyError: 'user'
The text was updated successfully, but these errors were encountered: