Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from selenium import webdriver
- from selenium.webdriver.common.by import By
- from selenium.webdriver.support.ui import WebDriverWait
- from urllib import request
- from bs4 import BeautifulSoup
- import requests
- from urllib.parse import urljoin
- import openpyxl as op
- import datetime
- import time
- driver = webdriver.Chrome('C:/chromedriver.exe')
- driver.get("https://www.pmda.go.jp/PmdaSearch/kikiSearch/")
- elem_search_word = driver.find_element_by_id("txtName")
- elem_search_word.send_keys("血液照射装置")
- elem_search_btn = driver.find_element_by_name('btnA')
- elem_search_btn.click()
- cur_url = driver.current_url
- html = request.urlopen(cur_url)
- soup = BeautifulSoup(html,'html.parser')
- print(soup)
- time.sleep(5)
- elem_serch_btn1 = driver.find_element_by_link_text('//*[@id="ResultList"]/tbody/tr[2]/td[1]/div/a')
- elem_serch_btn1.click()
Add Comment
Please, Sign In to add comment