When I scrape this website I get a weird error which I cannot fix. This is the error: https://prnt.sc/lyz1gr
I tried adding a user agent onto the headers (I tried many different ones) but the error still persists.
import bs4
import requests
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64)
AppleWebKit/537.36 (KHTML, like Gecko) '
'Chrome/68.0.3440.106 Safari/537.36'}
session = requests.get("https://revengeofficial.com/webstore?User-
Agent=Mozilla/5.0 (Windows NT 6.1; Win64; x64) "
"AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/68.0.3440.106 Safari/537.36")
page = bs4.BeautifulSoup(session.text, "html.parser")
print(page.title.text)
I expect to be able to see the page's title, but I get an error when I try to do so.
It looks as if there is an openSSL version conflict.
Have a look at this, it might help: Updating openssl in python 2.7
尝试将 ssl 更新到较新的版本。
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.