from DrissionPage import ChromiumPage,ChromiumOptions
co =ChromiumOptions().set_paths(browser_path=r"C:\Users\lenovo\AppData\Local\Google\Chrome\Application\chrome.exe")
#这里指定浏览器 注意ChromiumOptions()要有(),地址要加r
page =ChromiumPage(co)
# from DrissionPage._pages.chromium_page import ChromiumPage
# page = ChromiumPage()
#第二种方法
page.get("https://book.douban.com/latest?subcat=%E5%85%A8%E9%83%A8")
page.wait(1)
page.get_screenshot(path='./img1/',name="pic.jpg",full_page=True)
#保存截图
for i in range(3):
for book in page.eles('x://li[@class="media clearfix"]'):
name = book.ele('x://h2[@class=
💫《博主介绍》:✨又是一天没白过,我是奈斯,DBA一名✨ 💫《擅长领域》:✌️擅长Oracle、MySQL、SQLserver、阿里云AnalyticDB for MySQL(分布式数据仓库)、Linux,也在扩展大数据方向的知识面✌️…
319. Bulb Switcher
There are n bulbs that are initially off. You first turn on all the bulbs, then you turn off every second bulb.
On the third round, you toggle every third bulb (turning on if it’s off or turning off if it’s on). For the $i^{th} $roun…