swissWebcam.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:CAM2RetrieveData 作者: PurdueCAM2Project 项目源码 文件源码
def __init__(self):
        # disable the js of firefox to speed up. it is not necessary to run
        firefox_profile = webdriver.FirefoxProfile()
        firefox_profile.set_preference("browser.download.folderList", 2)
        firefox_profile.set_preference("javascript.enabled", False)

        # get the webdriver of the opened firefox and open the url
        self.driver = webdriver.Firefox(firefox_profile=firefox_profile)
        self.driver.get("http://en.swisswebcams.ch/verzeichnis/traffic/schweiz/beliebt")

        # open the file to store the list and write the format of the list at the first line
        self.f = open('list_swissWebcam_traffic.txt', 'w')
        self.f.write("country#city#snapshot_url#latitude#longitude" + "\n")

        # wait object to use
        self.wait = ui.WebDriverWait(self.driver, 10)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号