-
-
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
[nitter] Can't use date in directory format without an error #5253
Comments
I should note that other accounts successfully download without any issues, it's simply elonmusk's profile which fails after the first download Edit: this isn't true, it happens on other accounts too but i'm not sure what's triggering it and it's most easy to test on elonmusk's as it happens most instantly |
Anyway, this happens when parsing fails and I can't reproduce this error myself, so could you run it with |
The output is pretty much identical to before. I also tried deleting the elonmusk folder and the output seems the same regardless. Output, including the line because it simply appears once
Output when non-verbose
|
I should also note that the issue seems to only happen with the directory name for some reason... when I have {date:%Y-%m-%d} in the filename it doesn't happen. Configuration file{
"extractor": {
"nitter": {
"quoted": false,
"retweets": false,
"videos": true,
"directory": [
"twitter", "{user['name']}"
],
"filename": "{user['name']}_{date:%Y%m%d}_{date:%H%M}_{tweet_id}_{num}.{extension}",
"postprocessors": [
{
"name": "metadata",
"event": "after"
}
],
"nitterHostname": {
"root": "http://nitterHostname"
}
}
}
} When running with the filter that you requested, I don't get any lines which don't have the <class line. |
Right, this doesn't actually work since What you could do as a workaround is check the type of date and only format it when it's a datetime: "filename": {
"isinstance(date, datetime)": "{user['name']}_{date:%H%M}_{tweet_id}_{num}.{extension}",
"" : "{user['name']}_{date}_{tweet_id}_{num}.{extension}"
},
"directory":{
"isinstance(date, datetime)": ["twitter", "{user['name']}", "{date:%Y%m%d}"],
"" : ["twitter", "{user['name']}", "{date}"]
} |
There is a "tweet" with no files where parsing completely fails.
|
When attempting to use
gallery-dl
on "nitter/elonmusk" as an example, the extractor gives me an error after the first video successfully downloads and is saved, "[nitterHostname][error] DirectoryFormatError: Applying directory format string failed (ValueError: Invalid format specifier '%Y%m%d' for object of type 'str')
"Full output with -v
/etc/gallery-dl.conf
While I understand this may be hard to test due to a lack of public Nitter instances that are now available, there are still some which can be accessed and are listed on https://status.d420.de/ and I'm willing to help where I can. Could also just be an error with my config
The text was updated successfully, but these errors were encountered: