Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

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

Open
Anirban-Patra-OFC opened this issue Dec 5, 2023 · 0 comments

Comments

@Anirban-Patra-OFC
Copy link

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/')
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant