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

[bunkr] Fix extracting wmv files #4419

Merged
merged 1 commit into from
Aug 17, 2023
Merged

Conversation

wlritchi
Copy link
Contributor

The Bunkr extractor already had support for a number of file extensions that Bunkr hosts on a separate CDN. This PR adds another one, .wmv. I also found a few cases of files like foo.MOV which weren't being handled correctly, so this PR also updates the check to be case-insensitive.

@wlritchi
Copy link
Contributor Author

wlritchi commented Aug 12, 2023

I'm beginning to wonder if this should operate on a list of exclusions rather than inclusions - it seems to me that there's only so many file extensions that Bunkr could reasonably show a preview for and host directly on the first CDN. We could probably test this by uploading something with a random unknown extension, to see where it ends up by default. Of course, then we'd need to enumerate all of the image extensions that stay on the CDN.

Alternatively, maybe the most robust option is to just HEAD the file, and see if text/html is in the content-type header. If so, it's a download page, so we should fetch it and step through.

@mikf mikf merged commit 33d9124 into mikf:master Aug 17, 2023
7 of 8 checks passed
@wlritchi wlritchi deleted the fix-bunkr-wmv-files branch September 13, 2023 14:52
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

Successfully merging this pull request may close these issues.

2 participants