Python to achieve automatic seed magnetic link


Because I have nothing to do, I’m going to look for a movie to see. Then I found the seed search site, but this kind of website has too many pop-up ads, which makes me very tired. So I wanted to write a script in Python to automatically get magnetic links.

It took about half an hour.

The code is as follows

import requests
import re
from bs4 import BeautifulSoup
Url = * seed's website * / "
  "Accept-Encoding":"gzip, deflate",
  "Origin": "* seed's website *",
  "Referer": "* seed's website * /",
  "User-Agent":"Mozilla/5.0 (Windows NT 10.0.14393; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2950.5 Safari/537.36"
while True:
  Word = input
  for item in itemInfo:
    name= item.find_ previous("a",href= re.compile ("* seed's website * /. * \. HTML")). Text
  for item in torrent:
    Print ("Name:" torrent [item] [0])
    Print ("published on:" torrent [item] [1])
    Print ("size:" torrent [item] [2])
    Print ("heat:" torrent [item] [3])
    Print ("magnetic link:", torrent [item] [4], '\ n')

The results are as follows

The above Python automatic access to seed magnetic link method is the small editor to share all the content, I hope to give you a reference, also hope you can support developeppaer.

Recommended Today

Construction of Vue development environment and project creation under mac

start First of all, let’s take a look at the overall development environment of Vue. Homebrew: package manager under MAC system, similar to apt get under Linux, windows control panel – install and remove program Node.jsJavaScript runtime, which is similar to simultaneous interpretation in international conferences, can’t run various programming languages directly between different systems […]