Spam related services interface
Project description
A library to verify whether an url has been classified as spam
Supports:
SpamHaus zen
Surbl multi
Planned:
PhishTank
For any further information, you can watch the tutorial here: http://www.youtube.com/watch?v=anwy2MPT5RE
Install
From PyPI (stable):
pip install spam-blocklists
From Github (unstable):
pip install git+git://github.com/fmarani/spam.git#egg=spam-blocklists
Use
Spamhaus:
>>> from spam.spamhaus import SpamHausChecker
>>> checker = SpamHausChecker()
# google.com is a good domain
>>> checker.is_spam("http://www.google.com/search?q=food")
False
# this domain does not exist
>>> checker.is_spam("http://buyv1agra.com/")
Traceback (most recent call last):
...
DomainInexistentException
# this is a scam
>>> checker.is_spam("http://mihouyuan.com/login.htm")
True
Surbl:
>>> from spam.surbl import SurblChecker
>>> checker = SurblChecker()
# google.com test
>>> checker.is_spam("http://www.google.com/search?q=food")
False
# spamhaus says it is spam, surbl does not
>>> checker.is_spam("http://mihouyuan.com/login.htm")
False
# test endpoint for surbl
>>> checker.is_spam("http://surbl-org-permanent-test-point.com/")
True
Contribute
Clone and install testing dependencies:
pip install -r requirements.txt
Ensure tests pass:
./runtests.sh
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
spam-blocklists-0.9.3.tar.gz
(18.9 kB
view details)
File details
Details for the file spam-blocklists-0.9.3.tar.gz.
File metadata
- Download URL: spam-blocklists-0.9.3.tar.gz
- Upload date:
- Size: 18.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11be18d1ebafcb38ee136e1891cca08dc8f822a577a191c7759081c303abfcf8
|
|
| MD5 |
426f6d63186cd977afd9cc2f75b2bd9f
|
|
| BLAKE2b-256 |
e196e2151b454cc286afae4db3ef0bc45f64409654a86356b449920abe9bccf2
|