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

[nitter] user['id'] is always 0 #3949

Closed
kattjevfel opened this issue Apr 23, 2023 · 5 comments
Closed

[nitter] user['id'] is always 0 #3949

kattjevfel opened this issue Apr 23, 2023 · 5 comments

Comments

@kattjevfel
Copy link
Contributor

It appears user['id'] always returns on nitter, not sure if this is a problem with gallery-dl or nitter itself.

katt@main ~ » gallery-dl --ignore-config -K https://nitter.it/BF_HIYORATORY
Keywords for directory names:
-----------------------------
...
user['id']
  0
...

Keywords for filenames and --filter:
------------------------------------
...
  0
user['id']
  0
...

It works fine with twitter. Using gallery-dl 1d505b3

@mikf
Copy link
Owner

mikf commented Apr 23, 2023

The availability of user['id'] depends on the user having a profile banner, as weird as that may sound.

The only place where nitter has a user ID value in its HTML is the profile banner URL, and if that's not present then there's no way of getting that value except maybe querying Twitter itself.

Check the HTML source of https://nitter.it/BF_HIYORATORY and you won't find 1341019071266004992 anywhere.

@kattjevfel
Copy link
Contributor Author

hm, well should gallery-dl report it in the metadata at all, if it cannot find it?

@mikf
Copy link
Owner

mikf commented Apr 23, 2023

Not sure, but I think in general I'd prefer an empty/invalid value over no value at all.

@kattjevfel
Copy link
Contributor Author

fair enough, I'll close this then.

@kattjevfel kattjevfel closed this as not planned Won't fix, can't repro, duplicate, stale Apr 23, 2023
@mikf
Copy link
Owner

mikf commented Apr 23, 2023

Eventually, meaning v2.0 or later, there should be a proper undefined value (similar to util.NONE?) and trying to access anything undefined in any context should not raise an exception as it does at the moment, but a falsy value is good enough for now, I think. At least it lets users know that there is the possibility of a user ID instead of giving no information at all. (#3119 (comment))

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

No branches or pull requests

2 participants