0

I am trying to extract the date information from this web page. I have tried every method that I would expect to work. It seems that I am unable to extract any of the elements after many varied attempts using different driver methods. Additionally I attempted to use driver.page_source for the entire html for processing with Beautiful soup. I was unable to find the date information in the source results captured. I believe I must be missing something about the website. It is a java script website.

code attempts:

elem = driver.find_element_by_id("content")

elem = driver.find_element_by_class_name("GL-TVABCPFC")

and many others...

Source Inspection here: Source Inspection

Josh Shearer
  • 23
  • 2
  • 7
  • driver.find_element_by_class_name("GL-TVABCPFC") - [selenium documentation for python](https://selenium-python.readthedocs.io/locating-elements.html) – sobczi Nov 18 '19 at 02:11
  • this was my solution...I mistyped in my question. It does not work in this case. Sorry for the confusion. – Josh Shearer Nov 18 '19 at 02:31
  • If you want get text content do: ```driver.find_element_by_class_name("example").getAttribute("textContent")``` – sobczi Nov 18 '19 at 02:44
  • if the content is dynamically generated by JavaScript have a look at the XHR requests the website is making and then you won't have to use selenium at all . – Ahmed Soliman Nov 18 '19 at 07:49
  • if you want to use selenium please provide the source code – Ahmed Soliman Nov 18 '19 at 07:50

1 Answers1

0

Check whether date information is inside any iframe or not. if it is in iframe then you have to switch to that iframe then you need to call element by id or class methods.

Naren P
  • 214
  • 3
  • 14