divのHTMLをから取得しようとしています。pythonセレンを使用してJSからHTMLを取得
しかし、divの求人求職者はネットワークXHRに基づいてgranite.min.js
からロードされます。
from selenium import webdriver
from bs4 import BeautifulSoup
from pprint import pprint
path_to_chromedriver = "/Users/RichWin/Documents/chromedriver.exe"
browser = webdriver.Chrome(executable_path=path_to_chromedriver)
driver = browser.get('https://www.workday.com/en-us/company/careers/open-positions.html#?q=')
elem = driver.find_element_by_id('template-content')
soup = BeautifulSoup(elem.get_text, "html.parser")
for tag in soup.find_all('div'):
pprint(tag)
助けてもらえますか?
以下のように質問を更新してください:http://stackoverflow.com/help/how-to-ask – dm295
私の質問には何が問題なのですか? –
誰もあなたのために仕事をするつもりはありません - 努力の証拠が必要です。つまり、 – dm295