gallery.accords-library.com/server/szurubooru/func/net.py

8 lines
204 B
Python

import urllib.request
def download(url):
request = urllib.request.Request(url)
request.add_header('Referer', url)
with urllib.request.urlopen(request) as handle:
return handle.read()