Hacker News new | ask | show | jobs
by zelah 3354 days ago
I like this idea but there is a lot of porn. Can you block the porn?
3 comments

> but there is a lot of porn

Rule 44 - When the URL says "roulette", there's lots of porn abound.

:)
Well, I'm not exactly sure about how to do that. I could implement a list of all the major porn sites, but then people could still post porn URL using URL shorteners...
Display the URL with a countdown and a prominent "no thanks" button. Redirect after the countdown if they don't opt out.

A fair amount of sites you don't want to visit have obvious urls. Or maybe you could scrape the title and display that as well.

This is actually a good point, but I'd imagine people put down a porn website out of pure impulse when trying this service, so having their URL rejected with a friendly warning would certainly reduce the amount of porn spam. You could also block common URL shorteners.

This is a really cool app though!

Steven Black's hosts compilation [1] is a good start for what to disallow. For URL shorteners, you could disallow URLs that trigger an HTTP redirect (e.g. HTTP 301), or you could follow the chain of redirects and apply your rules to the terminal URL.

[1] https://github.com/StevenBlack/hosts

If you disallow redirect, it should allow redirects to the same domain.
I second this. Here is a big list of websites to filter.

http://pasted.co/b2dc3032

Wow, thanks, that's a long list. Will try to implement in the coming days... :)
Why should porn be banned? Maybe that will be the intrigue of some folks.
Make it optional, some of us are quite fond of porn.
>hosts file with urls

why even