Unable to scrap website with headless mode

Viewed 40

Getting empty page in headless mode when using selenium webdriver.

import bs4
import requests 
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
options=Options()
new_url='https://www.samr.gov.cn/fldes/ajgs/jyaj/'
options.add_argument('--disable-blink-features=AutomationControlled')
options.headless = True
browser = webdriver.Chrome(r'chromedriver.exe',
                           chrome_options=options)
browser.get(new_url)
print(browser.page_source)

html page output i am getting:

<html><head></head><body></body></html>
0 Answers
Related