我正在编写一个脚本,应该为我下载3000个文件。我已经通过登录和所有这些工作,但实际的下载按钮=“提取数据”是用闪存写的(网站的其余部分不是)有没有办法点击这个按钮使用selenium?我正在运行Python 3.4。在OSx上。
#!/usr/bin/python3
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from bs4 import BeautifulSoup
import os
import re
import requests
url = "http://www.votewatch.eu/signin.php?
return_path=http%3A%2F%2Fwww.votewatch.eu%2Fen%2Fterm8-protocol-to-
the-eu-uzbekistan-partnership-and-cooperation-agreement-accession-of-
croatia-draft-legis.html" #TestURL
driver = webdriver.Chrome(executable_path=r"/Users/mypath/Desktop/Uni
/ChromeDriver/ChromeDriver") #Chrome Driver
driver.implicitly_wait(30)
driver.get(url)
elem1 = driver.find_element_by_name("login_username")
elem1.clear()
elem1.send_keys("my_username")
elem2 = driver.find_element_by_name("login_password")
elem2.send_keys("mypassword")
driver.implicitly_wait(30)
login_click = driver.find_element_by_class_name("blue_button_link")
login_click.click()
extract_data_button = ??????? Flash magic ?????
非常感谢!