Ok, Im stuck. Im making a little web scraping python script using selenium and PhantomJS. The page that I working on has the data I want inside an iframe document that my web driver does not run.
<main Page Heads etc>
<blah>
<iframe 1 src="src1" ... etc etc>
#document
<tag>
<tag>
<iframe2 src="src2"><iframe2>
<iframe1>
<blah>
<end of webpage DOM>
I want to get the src of iframe2. I tried to run the src1 URL through my webdriver but all I get out is the raw page html, not the loaded webpage elements, iframe2 must be created by some script inside iframe1, but I can't get my webdriver to run the script.
Any ideas?
This what im doing to run the javascript on webpages to get the complied page DOM:
from selenium import webdriver
self.driver = webdriver.PhantomJS()
self.driver.get(url)
page = self.driver.page_source
soup = BeautifulSoup(page,'html.parser')