Extract all magnet links from an html page with Python

A simple and useful snippet

Recently i’ve developed a simple webscraper that extract magnet links from a specific page and starts the download with bittorrent.

The core of the script is the code snippet below, that uses pyquery in order to loop into a tags searching for a magnet link:

https://gist.github.com/andreafortuna/a5efc60d2215eb3554779e4bd38d455a

I hope that can be useful.

Enjoy!

1 Reply to “Extract all magnet links from an html page with Python”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.