Skip to main content

Additional tools

Project description

MPoster

Queues

Работа с очередями:

from mposter import queues

def queues_method(data):
    print(data)

_queues = queues.Queues(threads=10, target=queues_method)
for i in range(10):
    _queues.put(i)
_queues.join()

Http

Fuck_proxies

Пул для плохих проксей:

from mposter import http

fuck_proxies = http.Fuck_proxies()
...
for proxy in proxies:
    if fuck_proxies.check_proxy(_proxies.get('http')):  # Прокси есть в пуле, она плохая, идём за новой
        continue
...
if r.status_code == 403:  # Прокси забанена, добавляем в пул
    fuck_proxies.add(_proxy_port)

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

mposter-1.8.11.tar.gz (6.6 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page