Skip to content

Instantly share code, notes, and snippets.

@justin3737
Created March 21, 2018 06:22
Show Gist options
  • Save justin3737/3200a8dc7021a00778eae9be8d6d37b4 to your computer and use it in GitHub Desktop.
Save justin3737/3200a8dc7021a00778eae9be8d6d37b4 to your computer and use it in GitHub Desktop.
利用Python的爬蟲與Chrome driver 爬中央氣象局網頁
from selenium import webdriver
chromedriver = "/Users/justin_w_wu/Documents/www/drivers/chromedriver"
web = webdriver.Chrome(chromedriver)
web.get('http://www.cwb.gov.tw/V7/')
web.find_element_by_link_text('生活氣象').click() #點擊頁面上"天氣預報"的連結
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment