selenium-wire icon indicating copy to clipboard operation
selenium-wire copied to clipboard

SeleniumWire Unable to Intercept Network with Samsung S23 android user-agent

Open Anirban-Patra-OFC opened this issue 1 year ago • 0 comments

The chromedriver is initiated but in the network tab only images and png are shown.The XHR/Fetch is empty. image

Please keep your credentials ready for the creation of chrome profiles. What might be the reason of this issue?Please guide me to correct the problem.

from seleniumwire import webdriver
from selenium.webdriver.chrome.options import Options
opt_sw = {'enable-har':True}

options = Options()
samsung_s23_ultra = '''Mozilla/5.0 (Linux; Android 13; SAMSUNG SM-S918B) AppleWebKit/537.36 (KHTML, like Gecko)SamsungBrowser/21.0 Chrome/110.0.5481.154 Mobile Safari/537.36'''
mob_user_agent = '''Mozilla/5.0 (Linux; Android 11.0; SAMSUNG SM-G925I Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/7.4 Chrome/107.0.5304.105 Mobile Safari/537.36'''

options.add_argument(f'user-agent={samsung_s23_ultra}')


profile_path = r"user-data-dir=C:\Users\USER\AppData\Local\Google\Chrome\User Data\fb_Profile"
options.add_argument(profile_path)

options.add_experimental_option("useAutomationExtension", False)
options.add_experimental_option("excludeSwitches",["enable-automation"])
options.add_experimental_option('prefs', {
    'profile.default_content_setting_values.notifications': 1,
    'profile.default_content_setting_values.clipboard': 1
})
options.add_argument("window-size=600,880")

driver = webdriver.Chrome(options=options)
time.sleep(10)
driver.get('https://www.facebook.com/')

Anirban-Patra-OFC avatar Dec 05 '23 09:12 Anirban-Patra-OFC