# 需要导入的库 import osimport timefrom selenium import webdriverfrom selenium.webdriver.support.wait import WebDriverWaitfrom selenium.webdriver.support import expected_conditions as ECfrom selenium.webdriver.common.by import Byimport base64import geventimport datetimefrom gevent import monkeymonkey.patch_all() ...
# 1.先声明browser
browser = webdriver.PhantomJS('phantomjs路径,系统环境变量有,参数为空即可')
browser.get('浏览器地址') locator = (By.CSS_SELECTOR, '#sorting_1') tables = wait.until( EC.presence_of_all_elements_located(locator) )