sergiotapia / magnetissimo

Web application that indexes all popular torrent sites, and saves it to the local database.
MIT License
3k stars 190 forks source link

Improve NSFW checks #120

Closed skwerlman closed 6 years ago

skwerlman commented 6 years ago

This PR uses a RegexCase to simplifiy is_nsfw? for crawlers with lots of similarly-named categories.

This PR also uses a default case to prevent crashes on unknown categories.

Please don't merge this PR yet. In addition to there being a crash bug I missed before opening this PR, I'm letting it run overnight to see if there are any bugs I've missed. Testing for >12 hrs showed no problems.