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.0.zip (6.5 kB view details)

Uploaded Source

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

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

File details

Details for the file Maga-2.0.0.zip.

File metadata

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

File hashes

Hashes for Maga-2.0.0.zip
Algorithm Hash digest
SHA256 58b531df8ee3b81803558501d9dd772cbef339ff1afacfe6b5bb477800069443
MD5 53e8fae2493108180577c3ae5619b0b9
BLAKE2b-256 f2924a4d4d1cde8551396cc9dbb31622c948e56e947aacf399200760512d7bde

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for Maga-2.0.0.tar.gz
Algorithm Hash digest
SHA256 4f00621ab29fd325edfba72005c0f6e5489a15a5026e0894c634586e9912068b
MD5 8e51c56922e8d4dca804d71059d70dff
BLAKE2b-256 dc3397c3685fcc129d81f724274bcc1f8662b3aa67e0a3176777b4ced3d6a6af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for Maga-2.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4b7d071effdfd1acc08ec29fe5f69f1a1a318100919babd59fcca8e793bf9db3
MD5 9a23164ed9090061d73764c0d341ac55
BLAKE2b-256 bdf545177e5e1b63149f9144a8b300880db8711cb64273c4112b7e2819cc3de4

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