Returns: ------- bool True if the content is safe, False otherwise. """ for keyword in self.keywords: if keyword in content.lower(): return False return True
// Check file type $file_type = finfo_open(FILEINFO_MIME_TYPE); $file_mime_type = finfo_file($file_type, $_FILES['file']['tmp_name']); finfo_close($file_type);
""" Module for handling NSFW (Not Safe For Work) content filtering.
Returns: ------- bool True if the content is safe, False otherwise. """ for keyword in self.keywords: if keyword in content.lower(): return False return True
// Check file type $file_type = finfo_open(FILEINFO_MIME_TYPE); $file_mime_type = finfo_file($file_type, $_FILES['file']['tmp_name']); finfo_close($file_type);
""" Module for handling NSFW (Not Safe For Work) content filtering.