|
import urllib.request
h = "<img style"
t = ".jpg"
i = 0
posh = -len(h)
post = -len(t)
while i < s.count(h):
posh = s.find(h, posh + len(h))
post = s.find(t, posh + len(h))
print(s[posh:post + len(t)])
length = s[posh: post + len(t)]
http = length.find("//")
url = t[http:]
urllib.request.urlretrieve(url)
i += 1怎么下载链接的图片?求各位大神帮我看看 我新手
|
|