我试图用Python3.5编写一个程序,使用Selenium在中自动执行下载过程zbigz.com网站使用Firefox webdriver。我的代码如下:import time
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
#magnet link for the purpose of testing
mag = "magnet:?xt=urn:btih:86259d1c8d9dfbe15b6290268231e68d414fed23&dn=The.Big.Bang.Theory.S09E21.HDTV.x264-LOL%5Bettv%5D&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Fexodus.desync.com%3A6969"
def startdriver():
#starting firefox driver and waiting for 100 seconds
driver = webdriver.Firefox()
driver.implicitly_wait(100)
return driver
def download(driver, url, mg):
#opening up firefox at url = www.zbigz.com
driver.get(url)
try:
#accessing