First step is to try the user-agent that this site use.
Next step is to use Selenium.
Text would be:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36That dos not work as i tested it.
Next step is to use Selenium.
from selenium import webdriver from bs4 import BeautifulSoup from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.keys import Keys import time #--| Setup options = Options() #options.add_argument("--headless") browser = webdriver.Chrome(executable_path=r'chromedriver.exe', options=options) #--| Parse or automation browser.get('https://www.fragrantica.com/perfume/Chanel/Coco-Eau-de-Parfum-609.html') soup = BeautifulSoup(browser.page_source, 'lxml') browser.implicitly_wait(5) parfum = soup.select('#col1 > div > div > h1 > span')Now it work,eg here i use CSS seletor to get parfum title name.
Text would be:
>>> parfum [<span itemprop="name">Coco Eau de Parfum Chanel for women</span>] >>> parfum[0].text 'Coco Eau de Parfum Chanel for women'