Difference between revisions of "Urllib"

From wikieduonline
Jump to navigation Jump to search
 
(2 intermediate revisions by one other user not shown)
Line 6: Line 6:
  
 
Adding [[HTTP headers]]:
 
Adding [[HTTP headers]]:
  import urllib.request
+
  [[import]] urllib.request
 
  req = urllib.request.Request('http://www.example.com/')
 
  req = urllib.request.Request('http://www.example.com/')
 
  req.add_header('Referer', 'http://www.python.org/')
 
  req.add_header('Referer', 'http://www.python.org/')
Line 13: Line 13:
 
  r = urllib.request.urlopen(req)
 
  r = urllib.request.urlopen(req)
  
 +
== Related ==
 +
* [[Dependabot]]
  
 +
== See also ==
 
* {{Python}}
 
* {{Python}}
 +
 +
[[Category:Python]]

Latest revision as of 15:21, 1 July 2024

Advertising: