try:
import urllib.request as urllib2
except ImportError:
import urllib2
opener = urllib2.build_opener()
opener.addheaders.append(('Cookie', 'CookieName1=Cookie Name 1;CookieName2=Cookie Name 2'))
f = opener.open("https://www.url_target.com")
the_page_html = f.read()
print(the_page_html)
import urllib.request as urllib2
except ImportError:
import urllib2
opener = urllib2.build_opener()
opener.addheaders.append(('Cookie', 'CookieName1=Cookie Name 1;CookieName2=Cookie Name 2'))
f = opener.open("https://www.url_target.com")
the_page_html = f.read()
print(the_page_html)
Comments
Post a Comment