セレン輸入webdriverを インポート時の ドライバ = webdriver.Chrome()は してみてください: driver.implicitly_wait( 20 ) driver.get(' https://www.wandoujia.com/category/6001 ' ) time.sleepを( 5 ) js_code = " ' window.scrollToは(0,5000) ''」 driver.execute_script(js_code) time.sleep( 5) #商品信息加载、等待5S app_list = driver.find_elements_by_class_name(' カード' ) 以下のためのアプリでapp_list: #アプリ名称 APP_NAME = app.find_element_by_css_selector(' .APP-タイトル-H2のA ' )の.text #详情页URL detail_url = app.find_element_by_css_selector(' .APP-タイトル-H2のA ').get_attribute(" HREF ' ) #下载人数 #アプリ大小 download_num_size = app.find_element_by_class_name(' メタ" ).textの app_content = ""」 =================== アプリ名:{} 詳細ページのURL:{} 下载人数:{} アプリ大小:{} =================== \ n ""」 .format(APP_NAME、detail_url、download_num_sizeの[8]、download_num_size [11 :]) プリント(app_content) (オープンと' app.txt荚豌豆'、' '、エンコード= ' UTF-8 ' )、Fとして: f.write(app_content) time.sleep( 3 ) 最後に: driver.close ()