Earlier quoted context omitted.
He's traversing the site using the injected iframe. That is, there is no top-level navigation event, only an iframe navigation event. Then he's gathering information from the iframe hosted DOM and combining it in the context of the starting, main page. I think it's kinda clever.
Injecting an iframe into websites could trigger an assertion error, because the iframe isn't supposed to be there.
I only use an iFrame to crawl and scrape content
31–40 of 53 posts
Re: I only use an iFrame to crawl and scrape content
#32Won't the same origin policy kick in the moment I try to read the content of an iframe that isn't on the same origin as my website? Or is this meant to run on the dev console on the target website? In which case, the iFrame and the Airovic website doesn't make sense (the electron app mentioned does sure, but it doesn't exist)
But the airovic.com tool uses and external script, in the same server that provides http tunneling from same server, so I can modify headers and display everything on the iframe because it is under same domain.
Thanks for your comment!
Re: I only use an iFrame to crawl and scrape content
#33The site is working now, it was retrieving some localhost scripts.
I was just trying to get some feedback and to check if that document was interesting, because I was spending a lot of time on it.
For what I see, it seems Selenium does exactly the same, but I would choose this iframe solution (small-medium projects) anyway.
It's a super small tool that do the job.
Please, let me know if you can fully use airovic.com
Re: I only use an iFrame to crawl and scrape content
#34Re: I only use an iFrame to crawl and scrape content
#35This is how the very first version of Selenium worked. The application under test was in an iframe, and the test controller was in the parent page. The Selenium "Remote Control" protocol was later added where the controller would phone home to a listening web server for commands to relay to the iframe (basically, AJAX before it had a name. It all mostly worked for the most common test cases, but we abandoned this app…
Re: I only use an iFrame to crawl and scrape content
#36Okay, I'll stop speaking now and revealing the fact I started my career as a data guy at a giant corporation instead of a software engineer.
Re: I only use an iFrame to crawl and scrape content
#37This is how the very first version of Selenium worked. The application under test was in an iframe, and the test controller was in the parent page. The Selenium "Remote Control" protocol was later added where the controller would phone home to a listening web server for commands to relay to the iframe (basically, AJAX before it had a name. It all mostly worked for the most common test cases, but we abandoned this app…
The article only mentions malformed URLs and browser run-time errors. Were there any other "edge case limitations" that became intolerable.
Re: I only use an iFrame to crawl and scrape content
#38This is how the very first version of Selenium worked. The application under test was in an iframe, and the test controller was in the parent page. The Selenium "Remote Control" protocol was later added where the controller would phone home to a listening web server for commands to relay to the iframe (basically, AJAX before it had a name. It all mostly worked for the most common test cases, but we abandoned this app…
"It mostly worked for the most common test cases, but we abandoned this approach for similar reasons mentioned in the article -- the edge case limitations became more and more frustrating over time." The article only mentions malformed URLs and browser run-time errors. Were there any other "edge case limitations" that became intolerable.
Re: I only use an iFrame to crawl and scrape content
#39Earlier quoted context omitted.
"It mostly worked for the most common test cases, but we abandoned this approach for similar reasons mentioned in the article -- the edge case limitations became more and more frustrating over time." The article only mentions malformed URLs and browser run-time errors. Were there any other "edge case limitations" that became intolerable.
Some websites will detect the iframe and send nothing instead of the requested page. I happen to know from personal experience that YouTube is one of the sites that does this.
that's because they have a proper iframe-embed url: https://www.youtube.com/embed/quyj70RogxI (instead of https://www.youtube.com/watch?v=quyj70RogxI )