[Python] Grab Bing everyday Wallpaper's story with python3+selenium

Discussão em 'Python' iniciado por Stack, Setembro 11, 2025.

  1. Stack

    Stack Membro Participativo

    I want to get the story of Bing wallpaper once a day. It used to be available, but now there is a verification prompt asking me to confirm 'Verify you are human'. How can I solve this problem?

    [​IMG]

    my code

    import time
    from selenium import webdriver

    options = webdriver.ChromeOptions()
    options.add_argument("headless")
    options.add_argument('--incognito')
    options.add_argument('--no-sandbox')
    options.add_argument('--disable-gpu')
    options.add_argument('--start-maximized')
    options.add_argument('--disable-dev-shm-usage')
    options.add_argument("lang=en-US")
    options.add_argument("--disable-blink-features=AutomationControlled")
    options.add_experimental_option("excludeSwitches", ["enable-automation"])
    options.add_experimental_option('useAutomationExtension', False)
    user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36"
    options.add_argument(f"--user-agent={user_agent}")
    browser = webdriver.Chrome(options=options)

    browser.get('https://www.bing.com/search?q=%E5%B7%B4%E7%99%BB-%E7%AC%A6%E8%85%BE%E5%A0%A1&form=hpcapt&mkt=zh-cn&filters=HpDate:"20250831_1600"')
    time.sleep(60)

    Continue reading...

Compartilhe esta Página