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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.