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']
Try uninstalling and reinstalling using pip:
Uninstall:
pip uninstall httplib2
Reinstall:
pip install httplib2
List installed packages:
pip freeze