1

I am trying to get the html for a website, but the site uses https not http.

import httplib
c = httplib.HTTPSConnection("google.com")
c.request("GET", "/")
response = c.getresponse()
print response.status, response.reason
data = response.read()
print data

according to HTTPS connection Python the socket module needs to be compiled with ssl or have ssl enabled.

how do i do this? I am running ubuntu 14.04

Thanks

Community
  • 1
  • 1
jducreux
  • 107
  • 2
  • 9

0 Answers0