1、pip安装selenium
2、
from selenium import webdriver
import time
driver = webdriver.PhantomJS(executable_path=‘C:\Program Files\Anaconda3\Scripts\phantomjs‘) #设置phantomjs的储存路径
driver.get("http://vacations.ctrip.com/bookingnext/Comment/Search?pkg=12661501&destEname=&districtID=0&country=0&urlCategory=grouptravel&PMPicture=https://dimg04.c-ctrip.com/images/300g0a00000055ksrCEB6.jpg&pageIndex=2&score=undefined&IsTourGroupProduct=0")
time.sleep(3)
print(driver.find_element_by_id(‘js_questionData‘).text)
driver.close()
原文:http://www.cnblogs.com/pythongo/p/6416858.html