Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. from selenium import webdriver
  2. from selenium.webdriver.common.keys import Keys
  3. from bs4 import BeautifulSoup
  4. import re
  5. import pandas as pd
  6. import os
  7. #launch url
  8. url = "https://cdm22007.contentdm.oclc.org/digital/collection/p22007coll9/id/491924/rec/3"
  9.  
  10. # create a new Firefox session
  11. driver = webdriver.Firefox()
  12. driver.implicitly_wait(90)
  13. driver.get(url)
  14.  
  15. #attempts to click the transcripts button
  16. python_button = driver.find_element_by_id('panel panel-default') #FHSU
  17. python_button.click() #click fhsu link
  18.  
  19. #attempts to scrape the text
  20. el=driver.find_element_by_id("itemText")
  21. print(el.text)
  22.  
  23. #closes the browser
  24. driver.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement