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

[kemonoparty] Attachments can't be filtered by extension #1974

Closed
God-damnit-all opened this issue Oct 23, 2021 · 2 comments
Closed

[kemonoparty] Attachments can't be filtered by extension #1974

God-damnit-all opened this issue Oct 23, 2021 · 2 comments

Comments

@God-damnit-all
Copy link
Contributor

Tried "image-filter": "extension not in ('swf','zip')" and --filter "extension not in ('swf','zip')" but neither seemed to work.

I realized the problem must be that only the primary file of a post is susceptible to this filter.

@mikf
Copy link
Owner

mikf commented Oct 23, 2021

--filter or image-filter apply to all files,
and your --filter works for this example post:

$ gallery-dl -s https://kemono.party/fantia/user/114707/post/893927
893927_【進捗】+Twitter動画まとめ_01_4a100b08-92c1-428f-a92d-19a0791365f6.png
893927_【進捗】+Twitter動画まとめ_02_wip000.mp4
893927_【進捗】+Twitter動画まとめ_03_wip001.mp4
893927_【進捗】+Twitter動画まとめ_04_wip000_高画質.mp4
893927_【進捗】+Twitter動画まとめ_05_wip001_高画質.mp4
893927_【進捗】+Twitter動画まとめ_06_Twitter動画まとめ.zip

$ gallery-dl -s --filter "extension not in ('swf','zip','mp4')" https://kemono.party/fantia/user/114707/post/893927
893927_【進捗】+Twitter動画まとめ_01_4a100b08-92c1-428f-a92d-19a0791365f6.png

It does not work when the download URL or assumed filename is missing a filename extension. That might be the case here.

@God-damnit-all
Copy link
Contributor Author

God-damnit-all commented Oct 23, 2021

--filter or image-filter apply to all files, and your --filter works for this example post:

$ gallery-dl -s https://kemono.party/fantia/user/114707/post/893927
893927_【進捗】+Twitter動画まとめ_01_4a100b08-92c1-428f-a92d-19a0791365f6.png
893927_【進捗】+Twitter動画まとめ_02_wip000.mp4
893927_【進捗】+Twitter動画まとめ_03_wip001.mp4
893927_【進捗】+Twitter動画まとめ_04_wip000_高画質.mp4
893927_【進捗】+Twitter動画まとめ_05_wip001_高画質.mp4
893927_【進捗】+Twitter動画まとめ_06_Twitter動画まとめ.zip

$ gallery-dl -s --filter "extension not in ('swf','zip','mp4')" https://kemono.party/fantia/user/114707/post/893927
893927_【進捗】+Twitter動画まとめ_01_4a100b08-92c1-428f-a92d-19a0791365f6.png

It does not work when the download URL or assumed filename is missing a filename extension. That might be the case here.

It seems the problem I was actually having was that --filter and image-filter can't be used together (nor can you use multiple --filter commands in any way).

I overlooked that my script was applying an id-based filter. Sorry about that.

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