Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from bs4 import BeautifulSoup
- import requests
- url = "http://www.google.com"
- response = requests.get(url)
- soup = BeautifulSoup(response.text, "html.parser")
- links = soup.find_all("a")
- for link in links:
- print(link.text)
- error: UnicodeEncodeError: 'gbk' codec can't encode charactor 'xbb' in position 5:
- illegal multibyte sequence.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement