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

twitter video classify crashes #138

Closed
Draic opened this issue Dec 11, 2018 · 2 comments
Closed

twitter video classify crashes #138

Draic opened this issue Dec 11, 2018 · 2 comments
Labels

Comments

@Draic
Copy link

Draic commented Dec 11, 2018

I am downloading videos and photos from twitter. Trying to use the classify postprocessors for twitter to split videos from pictures. Tried:
"postprocessors": [
{
"name": "classify",
"mapping": {
"images": ["jpg", "png", "gif"],
"videos": ["mp4"]
}
}
]
Inside my twitter syntax in the config.
Images work fine but once the first video is processed the script will crash:

[twitter][debug] Traceback
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/gallery_dl/job.py", line 52, in run
self.dispatch(msg)
File "/usr/local/lib/python3.7/site-packages/gallery_dl/job.py", line 94, in dispatch
self.handle_url(url, kwds)
File "/usr/local/lib/python3.7/site-packages/gallery_dl/job.py", line 190, in handle_url
pp.prepare(self.pathfmt)
File "/usr/local/lib/python3.7/site-packages/gallery_dl/postprocessor/classify.py", line 36, in prepare
ext = pathfmt.keywords["extension"]
KeyError: 'extension'

@mikf
Copy link
Owner

mikf commented Dec 11, 2018

This appears to be a harder-to-solve problem than I initially thought.

With 79f6755 it at least doesn't crash anymore, but it still can't move videos into their own directory.

The main issue here is the youtube-dl downloader setting a (new) filename extension for the video and in doing so causing the target path to be rebuild.

@Draic
Copy link
Author

Draic commented Dec 11, 2018

tested it out: Indeed no crash any longer. Videos are not moved to the correct directory as you said, but that is a minor issue for me. Thanks!

@mikf mikf added the bug label Feb 6, 2019
@mikf mikf closed this as completed in 2495b99 Aug 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants