10 lines
334 B
Python
10 lines
334 B
Python
import shutil
|
|
import requests
|
|
def get_img(url):
|
|
url = 'http://imgsmall.dmzj.com/h/59665/121592/0.jpg'
|
|
headers = {'Referer': 'https://www.dmzj.com/'}
|
|
response = requests.get(url=url, headers=headers, stream=True)
|
|
with open('0.jpg', 'wb') as out_file:
|
|
shutil.copyfileobj(response.raw, out_file)
|
|
del response
|