-
-
Notifications
You must be signed in to change notification settings - Fork 995
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
[*chan] Add text-posts opt (generic text-tweets) #3626
base: master
Are you sure you want to change the base?
Conversation
|
Oh, and if #3447 is merged, that extractor will need a similar change to the ones here. |
This seems to not work with |
|
Sorry for not being clear Adding |
{
"postprocessors": [{"name": "mtime"}],
"extractor": {
"postprocessors": [{"name": "ugoira"}],
"4chan": {
"postprocessors": [{"name": "compare"}]
}
}
}
|
|
The extra Directory messages are updating the directory for every post in the thread. By default, the directory is set to threadId + the text in the post, which wasn't a problem when the directory was only updated for the first post. Now it's making folders with the original thread ID + the text of the current post. The metadata filename for the text post itself gets weird and ends up having the thread ID + the most recent image filename, or just "metadata" if there is none. |
I made an experimental commit for Lynxchan only, but it's just the bare minimum to make it work. As with wlritchi's version, it needs the postprocessor event in gallery-dl.conf set to "post". To keep the old metadata from being duplicated, I used this filename: "{postId}{num:?-//} {filename|subject|message[:50]}{extension:?['.'/]/}.json" For posts with files, the filenames should be identical to the old ones. For posts without files, the format will be like the default folder filename. |
Wiiplay123@751eb3b Finally got around to pushing the extra changes to my fork to make text posts on vichan work, and added a "metadata" event that is triggered on a successful metadata write. |
The Twitter extractor has a
text-tweets
option, which causes it to return Directory results even for tweets with no media. Some other extractors (such as Patreon) behave this way by default. Still others skip non-media posts entirely. This PR adds atext-posts
option to (some of?) the extractors that otherwise skip non-media posts, and updates the Twitter extractor to respect this new option alongside the existing Twitter-specific one.I did a cursory search for common patterns (
if not files
and the like) that I expected might appear in extractors that skipped non-media posts. The only ones I found were the *chan extractors. The logic change is broadly similar in all of them: move the Directory result inside the loop over posts rather than just one per thread.This change probably isn't meaningful without corresponding post-processor config for each extractor. I tested with the following config additions:
420chan appears to be permanently offline, so no test results for that one. For the rest, I found threads with some text-only posts1 and manually tested. Everything seems to work as I expected.
This change was requested in #570 (comment). The ticket itself appears to be about Twitter; should that one be closed as completed? (regardless of this PR)
Footnotes
Which was a rather unpleasant task for some of these sites. ↩