Article From:https://segmentfault.com/q/1010000012146170
Question:
searchValue = input('search:')
url = url + searchValue
req = request.Request(url)
page = request.urlopen(req)
bsObj = BeautifulSoup(page.read(), "lxml")
print(bsObj)

This is a mistake
UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 14-15: ordinal not in range(128)

Just writing this, Google, there is no definite answer.

Answer 0:

resolved

parse.quote(input('search: '))

Leave a Reply

Your email address will not be published. Required fields are marked *