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

Only scan for links on html/textual data #106

Open
bensheldon opened this issue Nov 4, 2024 · 1 comment · May be fixed by #107
Open

Only scan for links on html/textual data #106

bensheldon opened this issue Nov 4, 2024 · 1 comment · May be fixed by #107

Comments

@bensheldon
Copy link

Thanks for this gem 🙇🏻

I noticed that the crawler will attempt to scan everything for links, including images:

Utils.scan_for_links(response.body) do |path|

I noticed this because for some strange reason I have a PNG on my blog that scans positively for a blank URI, which then raises a bad URI(is not URI?): nil (URI::InvalidURIError)

This is the image: https://island94.org/uploads/2009-09-13-My-featured-dead-cockroach/wired-cockroach.png

@benpickles
Copy link
Owner

Ah yes I see…

Having some sort of mapping between mime type and how to handle the response’s contents sounds super sensible - I guess I haven’t fully encountered the need before. If it was more capable it could also cover other cases like #95 - though that part feels more than one step away.

Thanks for creating the issue, it makes me so happy to know that someone else is using it!

@bensheldon bensheldon linked a pull request Dec 26, 2024 that will close this issue
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 a pull request may close this issue.

2 participants