This is the test development of the full stack of Xiao Qiang students contribute, than the heart!
Objective
In order to see the American drama "Scorpio", finally found in the movie Paradise website, quack, so I want to download down to enjoy.
Code
Import Requests,re,os,time
#电影的URL地址
url = "Http://www.dygod.net/html/tv/oumeitv/109673.html"
s = requests.get (URL)
# print (s.encoding) #打印下汉字的编码类型
res = Re.findall (' href= ' (. *?) " >ftp ', S.text)
For Resi in Res:
#汉字转换成utf-8 encoding
# Print (I.encode ("Iso-8859-1"). Decode (' GBK '). Encode (' UTF8 '). Decode (' UTF8 '))
A=resi.encode ("Iso-8859-1"). Decode (' GBK '). Encode (' UTF8 '). Decode (' UTF8 ')
Print (a) #打印一下看下效果
Os.chdir ("D:\Program Files (x86) \thunder network\thunder\program\")
Os.system ("Thunder.exe-starttype:desktopicon"%s ""% a)
Time.sleep (1)
After running the code:
I use the Thunderbolt speed version, installed on the D drive.
Note: You should start the Thunderbolt before downloading
Download the American drama "Scorpio" in Python