資源簡介
代碼片段和文件信息
#coding:utf-8??
from?selenium?import?webdriver??
from?selenium.webdriver.support.ui?import?WebDriverWait???#?WebDriverWait的作用是等待某個條件的滿足之后再往后運行??
import?time??
import?sys??
driver?=?webdriver.PhantomJS(executable_path=r‘D:\Projects\PythonProjects\PythonApplication1\PythonApplication1\phantomjs-2.1.1-windows\bin\phantomjs.exe‘)??#?構造網頁驅動??
??
driver.get(‘http://www.yingxiaobu.com/forum.php‘)???????#?打開網頁??
driver.find_element_by_xpath(‘//*[@id=“ls_username“]‘).send_keys(‘你的用戶名‘)??
driver.find_element_by_xpath(‘//*[@id=“ls_password“]‘).send_keys(‘你的密碼‘)??
#driver.get_screenshot_as_file(‘驗證碼.jpg‘)???????????????????#?截取當前頁面的圖片??
#input_solution?=?input(‘請輸入驗證碼?:‘)??手工打碼??
#driver.find_element_by_xpath(‘//input[@name=“captcha“]‘).send_keys(input_solution)??
#time.sleep(2)??
??
dr
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????1767??2018-06-08?22:30??PythonApplication1.py
?????目錄???????????0??2018-06-08?21:57??phantomjs-2.1.1-windows\
?????文件???????17204??2016-01-24?16:41??phantomjs-2.1.1-windows\ChangeLog
?????文件????????1429??2016-01-24?16:41??phantomjs-2.1.1-windows\LICENSE.BSD
?????文件????????2502??2016-01-24?16:41??phantomjs-2.1.1-windows\README.md
?????目錄???????????0??2018-06-08?21:57??phantomjs-2.1.1-windows\bin\
?????文件????18587648??2016-01-25?06:21??phantomjs-2.1.1-windows\bin\phantomjs.exe
?????目錄???????????0??2018-06-08?21:57??phantomjs-2.1.1-windows\examples\
?????文件?????????267??2016-01-24?17:22??phantomjs-2.1.1-windows\examples\arguments.js
?????文件?????????686??2016-01-24?17:22??phantomjs-2.1.1-windows\examples\child_process-examples.js
?????文件????????1671??2016-01-24?17:22??phantomjs-2.1.1-windows\examples\colorwheel.js
?????文件?????????226??2016-01-24?17:22??phantomjs-2.1.1-windows\examples\countdown.js
?????文件????????1774??2016-01-24?17:22??phantomjs-2.1.1-windows\examples\detectsniff.js
?????文件?????????601??2016-01-24?17:22??phantomjs-2.1.1-windows\examples\echoToFile.js
?????文件?????????806??2016-01-24?17:22??phantomjs-2.1.1-windows\examples\features.js
?????文件?????????286??2016-01-24?17:22??phantomjs-2.1.1-windows\examples\fibo.js
?????文件??????????60??2016-01-24?17:22??phantomjs-2.1.1-windows\examples\hello.js
?????文件?????????865??2016-01-24?17:22??phantomjs-2.1.1-windows\examples\injectme.js
?????文件?????????674??2016-01-24?17:22??phantomjs-2.1.1-windows\examples\loadspeed.js
?????文件?????????715??2016-01-24?17:22??phantomjs-2.1.1-windows\examples\loadurlwithoutcss.js
?????文件???????51351??2015-10-07?04:05??phantomjs-2.1.1-windows\examples\modernizr.js
?????文件?????????135??2016-01-24?17:22??phantomjs-2.1.1-windows\examples\module.js
?????文件?????????671??2016-01-24?17:22??phantomjs-2.1.1-windows\examples\netlog.js
?????文件????????4228??2016-01-24?17:22??phantomjs-2.1.1-windows\examples\netsniff.js
?????文件?????????779??2016-01-24?17:22??phantomjs-2.1.1-windows\examples\openurlwithproxy.js
?????文件?????????392??2016-01-24?17:22??phantomjs-2.1.1-windows\examples\outputEncoding.js
?????文件????????4521??2016-01-24?17:22??phantomjs-2.1.1-windows\examples\page_events.js
?????文件?????????623??2016-01-24?17:22??phantomjs-2.1.1-windows\examples\pagecallback.js
?????文件?????????622??2016-01-24?17:22??phantomjs-2.1.1-windows\examples\phantomwebintro.js
?????文件?????????394??2016-01-24?17:22??phantomjs-2.1.1-windows\examples\post.js
?????文件?????????472??2016-01-24?17:22??phantomjs-2.1.1-windows\examples\postjson.js
............此處省略24個文件信息
評論
共有 條評論