win11系统,如何才能一键打开多个网址,两个网址一个窗口,不要在同一个窗口,像那个图片那样。然后打开了全部都是这样的手机模式访问的。能实现吗?
那个设置bat一键打开多个网址的,我也懂。但是都在同一个窗口,还有就是要手动进入这样的手机模式。

win11系统,如何才能一键打开多个网址,两个网址一个窗口,不要在同一个窗口,像那个图片那样。然后打开了全部都是这样的手机模式访问的。能实现吗?
那个设置bat一键打开多个网址的,我也懂。但是都在同一个窗口,还有就是要手动进入这样的手机模式。

万能的python 给你来个牛逼的。网址你自己加
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.edge.options import Options
url='https://www.baidu.com'
url1='https://music.163.com/'
url2='https://www.taobao.com'
js="window.open('{}','_blank');"
width=600
height=400
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36'
}
mobile_emulation = {"deviceName": "iPhone 6"}
options = Options()
options.add_experimental_option("mobileEmulation", mobile_emulation)
driver1 = webdriver.Edge(options=options)
driver1.set_window_rect(x=8,y=8,height=height,width=width)
driver1.get(url)
driver1.execute_script(js.format(url2))
driver2 = webdriver.Edge(options=options)
driver2.set_window_rect(x=800,y=8,height=height,width=width)
driver2.get(url1)
driver2.execute_script(js.format(url2))
driver3 = webdriver.Edge(options=options)
driver3.set_window_rect(x=8,y=430,height=height,width=width)
driver3.get(url2)
driver3.execute_script(js.format(url2))
driver4 = webdriver.Edge(options=options)
driver4.set_window_rect(x=800,y=430,height=height,width=width)
driver4.get(url)
driver4.execute_script(js.format(url2))
