Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

urllib.request.urlretrieve

>>> import urllib.request
>>> #urllib.request.urlretrieve(url, filename=None, reporthook=None, data=None)
#Copy a network object denoted by a URL to a local file
>>> local_filename, headers = urllib.request.urlretrieve('http://python.org/')
>>> html = open(local_filename)
>>> html.close()
Comment

urllib request

from urllib.request import urlopen
import ssl

ssl._create_default_https_context = ssl._create_unverified_context

with urlopen("https://3.101.140.252") as response:
  body = response.read()
body
Comment

PREVIOUS NEXT
Code Example
Python :: how to change the values of a column in numpy array 
Python :: pandas groupby mean round 
Python :: groupby and sort python 
Python :: read csv pandas 
Python :: django collectstatic 
Python :: scikit learn pca 
Python :: print multiple lines python 
Python :: How to convert string date to datetime format in python 
Python :: python - subset dataframe based on unique value of a clumn 
Python :: how to check if a file exists in python 
Python :: jinja2 template import html with as 
Python :: two dimensional array python 
Python :: kivy button on click 
Python :: how to import opencv in python 
Python :: add place in certain index python string 
Python :: requests save data to disk 
Python :: how to install python libraries using pip 
Python :: pandas print a single row 
Python :: random 0 or 1 python 
Python :: selenium save webpage as pdf python 
Python :: Determine the sum of al digits of n 
Python :: python code with sigma 
Python :: picasa 
Python :: python check if dataframe series contains string 
Python :: python constructor overloading 
Python :: how to loop through string in python 
Python :: how to install tkinter in pycharm 
Python :: open file in python directory 
Python :: seaborn iris dataset 
Python :: calculate days between two dates using python 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =