web scraping - InvalidSchema("No connection adapters were found for '%s'" % url) in python -
this first time on webscraping , dont hard on me. learning scrape data out of site getting following error:
raise invalidschema("no connection adapters found '%s'" % url) invalidschema: no connection adapters found '('http://en.oxforddictionaries.com/definition/good', 'html.parser')'
this code:
import requests bs4 import beautifulsoup url=('http://en.oxforddictionaries.com/definition/good',"html.parser") r=requests.get(url) soup=beautifulsoup(r.content) links=soup.find_all("a")
i have seen other answers , notice need put http://
, have done no avail.
thank time.
the 'html.parser'
parameter should passed beautifulsoup
not requests.get
. passing latter makes url
nonsensical requests.get
:
url = 'http://en.oxforddictionaries.com/definition/good' ... soup = beautifulsoup(r.content, 'html.parser')
Comments
Post a Comment