Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from selenium import webdriver
- url = 'http://structurednotes-announce.tdcc.com.tw/Snoteanc/apps/bas/BAS210.jsp'
- browser = webdriver.Firefox()
- browser.get(url)
- agentSelect = browser.find_element_by_id('agent')
- for option in agentSelect.find_elements_by_tag_name('option'):
- if option.text == "法商東方匯理銀行台北分行":
- option.click()
- break
- dateSelect = browser.find_element_by_id('stopDate')
- for option in dateSelect.find_elements_by_tag_name('option'):
- if option.text == '已到期':
- option.click()
- break
- button = browser.find_element_by_xpath('//input[@type="button" and @value="查詢"]')
- button.click()
- print(browser.page_source)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement