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 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