Skip to content
This repository has been archived by the owner on Feb 22, 2021. It is now read-only.

Commit

Permalink
Usage improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
whtsky committed Aug 15, 2016
1 parent 2e99f51 commit a937870
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,23 @@ Usage
class Crawler(Maga):
async def handle_get_peers(self, infohash, addr):
logging.info(addr)
logging.info(infohash)
logging.info(
"Receive get peers message from DHT {}. Infohash: {}.".format(
addr, infohash
)
)
async def handle_announce_peer(self, infohash, addr, peer_addr):
logging.info(addr)
logging.info(infohash)
logging.info(
"Receive announce peer message from DHT {}. Infohash: {}. Peer address:{}".format(
addr, infohash, peer_addr
)
)
crawler = Crawler()
crawler.run(6881)
# Set port to 0 will use a random available port
crawler.run(port=0)
ChangeLog
Expand Down

0 comments on commit a937870

Please sign in to comment.