1

im installed httplib2 using pip but when i write this code its give me error No module named httplib2 why ? the code

import httplib2
from BeautifulSoup import BeautifulSoup, SoupStrainer

http = httplib2.Http()
status, response = http.request('http://www.google.com')

for link in BeautifulSoup(response, parseOnlyThese=SoupStrainer('a')):
    if link.has_attr('href'):
    print link['href']
theasker2000
  • 29
  • 4
  • 11

1 Answers1

3

Try uninstalling and reinstalling using :

Uninstall:

pip uninstall httplib2 

Reinstall:

pip install httplib2

List installed packages:

pip freeze
bruntime
  • 371
  • 2
  • 13
Jon..
  • 430
  • 1
  • 5
  • 16