Skip to main content

A DHT crawler framework using asyncio.

Project description

A DHT crawler framework using asyncio.

Usage

from maga import Maga

import logging
logging.basicConfig(level=logging.INFO)


class Crawler(Maga):
    async def handler(self, infohash, addr):
        logging.info(addr)
        logging.info(infohash)


# Or, if you want to have more control

class Crawler(Maga):
    async def handle_get_peers(self, infohash, addr):
        logging.info(addr)
        logging.info(infohash)

    async def handle_announce_peer(self, infohash, addr):
        logging.info(addr)
        logging.info(infohash)


crawler = Crawler()
crawler.run(6881)

ChangeLog

Version 2.0.0

  • Add handle_get_peers, handle_announce_peer function.

  • Add addr param in handler

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

Maga-2.0.1.zip (6.5 kB view details)

Uploaded Source

Maga-2.0.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

Maga-2.0.1-py2.py3-none-any.whl (4.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file Maga-2.0.1.zip.

File metadata

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

File hashes

Hashes for Maga-2.0.1.zip
Algorithm Hash digest
SHA256 e59adcb20ce81c6f90846ec35dc9d5b9c947702fd5765619a8ebf2c264c7e950
MD5 208ef9e94e304550b3a3185f8d626edd
BLAKE2b-256 5af5df13046268f8a893aeed94422a4d232e78a7e4ca5794fba5ecf77236b5c4

See more details on using hashes here.

File details

Details for the file Maga-2.0.1.tar.gz.

File metadata

  • Download URL: Maga-2.0.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Maga-2.0.1.tar.gz
Algorithm Hash digest
SHA256 7930d1206c468bac44a334de5f1d0697b35c1e4c18b56a65076e27662ba3d451
MD5 173c92b9a7310784f4424de0a3f6b260
BLAKE2b-256 f265b5fbf7145d3b7e097bbf7950672d1d2906ac1e31e7bd2a12d938e46ee32c

See more details on using hashes here.

File details

Details for the file Maga-2.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for Maga-2.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0cdcb55db1fd2798e199745a3e1949f537ffa394515028cdbba36a309d4969ea
MD5 589ac99a8329c9a942c172f857d4321c
BLAKE2b-256 b79c1a5f66ff45685038c24e7033a4471d9969bd7cba7b8270b77bda269155ff

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