def __init__(self):
# store the url of homepage, traffic page, the country code, and the state code
self.home_url = "http://www.wsoctv.com"
self.traffic_url = "http://www.wsoctv.com/traffic/nc-cams"
self.country = "USA"
self.state = "NC"
# open the file to store the list and write the format of the list at the first line
self.f = open('list_NorthCarolina_wsoctv.txt', 'w')
self.f.write("city#country#state#snapshot_url#latitude#longitude" + "\n")
# open the web-browser
firefox_profile = webdriver.FirefoxProfile()
firefox_profile.set_preference("browser.download.folderList", 2)
firefox_profile.set_preference("javascript.enabled", False)
self.driver = webdriver.Firefox()
self.wait = ui.WebDriverWait(self.driver, 10)
NorthCarolina_wsoctv.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录