How to bypass Close Dev Tools and Reload Selenium

Viewed 14
url = 'https://ww3.gogoanime2.org/watch/isekai-meikyuu-de-harem-wo-uncensored/1'

path = 'C:/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe'
headers =  {
    'User-Agent' : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36',
    'Accept-Language' : 'en-GB,en;q=0.5',
    'Referer' : 'https:google.com',
    'DNT' : '1'
}
options = Options()
options.binary_location = path
options.add_argument('proxy-server=106.122.8.54:3128')
options.add_argument('--user-data-dir=C:/Users/caaka/AppData/Local/BraveSoftware/Brave-Browser/User Data/Default')
driver2 = uc.Chrome(options = options)
driver2.request_interceptor = headers
driver2.get(url)

enter image description here

I'm trying to write a script that will extract the.m3u8 file after the webpage has been loaded. However, it detects devtools in this case and video doesn't get loaded. I'd like to avoid it. Is there another way to get there network tab info without having to load a webpage?

0 Answers
Related