摘要: # 假设有一个包含多个字典的列表,每个字典代表一个人的信息 people = [ {'name': 'Alice', 'age': 30}, {'name': 'Bob', 'age': 25}, {'name': 'Charlie', 'age': 35} ] # 按 age 字段升序排序 sor 阅读全文
posted @ 2025-12-29 15:10 chenlight 阅读(1) 评论(0) 推荐(0)
摘要: from selenium import webdriver from pyquery import PyQuery as pq from selenium.webdriver.common.by import By from selenium.webdriver.support import ex 阅读全文
posted @ 2025-12-29 13:56 chenlight 阅读(6) 评论(0) 推荐(0)
摘要: from playwright.sync_api import sync_playwright def on_response(response): print(f'Status {response.status}:{response.url}') with sync_playwright() as 阅读全文
posted @ 2025-12-29 11:18 chenlight 阅读(24) 评论(0) 推荐(0)
摘要: from playwright.sync_api import sync_playwright with sync_playwright() as p: for browser_type in [p.chromium,p.firefox,p.webkit]: browser = browser_ty 阅读全文
posted @ 2025-12-29 08:59 chenlight 阅读(168) 评论(0) 推荐(0)