Skip to main content

Python wrapper for cleanweb API of Yandex to fight spam.

Project description

https://travis-ci.org/coagulant/cleanweb.png?branch=master https://coveralls.io/repos/coagulant/cleanweb/badge.png?branch=master

Python wrapper for cleanweb API of Yandex to fight spam.

Yandex.Clean Web helps against spam in text message in comments, on forums, etc. It detects spam messages based on their content and offers API for graphic CAPTCHA. Technlogies that power Yandex.Mail spam defence are behind Yandex.Clean Web.

Install

API is provided as is

Usage

Examples show basic usage of cleanweb api, for details check sources and docs:

>> from cleanweb import Cleanweb
>> client = Cleanweb(key='cw.1.1.fc4c0c5c3be05adb04c9400214T193305Z')
  • check if message contains spam:

    >> client.check_spam(body='This might be some spam message')
    {'id': '036151771200000F', 'links': [], 'spam_flag': False}
  • get captcha to show bots:

    >> client.get_captcha()
    {'captcha': '20_iC0ZHRYtEllRhgEAngpsenpKGCIyi',
     'url': 'http://i.captcha.yandex.net/image?key=20_iC0ZHRYtEllRhgEAngpsenpKGCIyi'}
http://habrastorage.org/storage2/1a3/fda/5f4/1a3fda5f431fe7be4ed116220d383d40.png
  • check captcha:

    >> client.check_captcha(captcha='20_iC0ZHRYtEllRhgEAngpsenpKGCIyi', value='48151632')
    True
  • complain on spam detector:

    >> client.complain(id='036151771200000F', is_spam=False)
    True

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

cleanweb-2.0.zip (6.5 kB view details)

Uploaded Source

File details

Details for the file cleanweb-2.0.zip.

File metadata

  • Download URL: cleanweb-2.0.zip
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cleanweb-2.0.zip
Algorithm Hash digest
SHA256 126ed1f730e5734ba4e17c0c775a5f4645bb1724f794171fe621ab05802dffcc
MD5 ed31bfa1fc1f4f95a632c89aa2b0d937
BLAKE2b-256 998e734b1c8a276131bf31caabb7e73968b7b03acaa5671b11c2dc6171d48423

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page