I'm trying to scrape site with iframe so when I do ghost.show()
I see my result normally so iframe is filled, but after when I do ghost.content
it returns iframe empty, think it's done for security but how can I get this data?
Thank you and sorry for bad english.
Asked
Active
Viewed 564 times
-1

Shekspir
- 87
- 2
- 12
1 Answers
2
You can descend into your frame this way:
ghost = Ghost()
ghost.frame('<your frame name>')
g.content # Your frame content
g.frame() # ascent back to root frame
http://ghost-py.readthedocs.org/en/latest/#ghost.Ghost.frame

jeanphix
- 174
- 1
- 4
-
thank you Jeanphix for this great lib.Can you say what must be in '
', I mean how I get it? – Shekspir Jan 11 '15 at 14:11 -
You can now pass the iframe `name` attribute value or the iframe index. https://github.com/jeanphix/Ghost.py/commit/0af36cff0dd39d5e05f6d012868907905d01a7a6#diff-9abba704801dc0e59ef9b8874f1c6b98L437 – jeanphix Jan 12 '15 at 20:34