Page 1 of 1

Extracting data from iframe on another domain

Posted: Thu Jan 27, 2022 12:27 pm
by yeti
Hi Juan,

I am almost there with my project that involves extracting data from eBay.

I have almost everything I need working now except for getting the 'description' from within the iframe inside of a listing.

As you probably know, the iframe on eBay is on another domain and I have the exact URL of the iframe for the specific item (which is different for every item scraped) inside of a Text as collected when scraping the listing page.

I am wondering how to tell the browser to navigate to the URL of the iframe from the URL collected inside of the Text, rather than needing to enter the exact URL into the Browser.Load [url]?

I currently have:

Code: Select all

This gets the exact iframe URL.

And I have tried:

Code: Select all

Which doesnt seem to work.

How would I get the browser to now visit this specific URL to get the data inside of it?

If I enter a specific/fixed URL into the Browser.Load [url] then it works, however it needs to pull the unique URL from each listing for it to work correctly. So the only thing that is needed is how to navigate to the iframe URL.

I have been trying a few different methods including using a Script to use inside of the Browser.Load [url], though with my limited understanding the result is seemingly always empty.

I have also tried to copy the method that tells the browser to navigate the item title, to load the item page, however it does not work, probably as the URL in this case is not a 'link' and is just 'text'?

Any help would be appreciated.

Thank you.

Re: Extracting data from iframe on another domain

Posted: Fri Jan 28, 2022 11:24 am
by webmaster
I'll just copy/paste my response to the other similar question. Just right-click Text.Iframe_url and select Output Result (or alternatively, left-click it and press the space bar). A placeholder [name] at the bottom will appear:

Code: Select all

as [name]
Then replace the [name] placeholder with a variable name, such as url, and finally replace your Browser.Navigate with a Browser.Load that takes the url variable. It should look like this:

Code: Select all

as url
   ยท  url
In general, you can output anything into a variable using this method, and you can always use Sequence.Log to see what's in any variable (you can see the log at Project > Log).

Re: Extracting data from iframe on another domain

Posted: Sun Jan 30, 2022 1:40 pm
by yeti

This is working now.

Almost there, and learning more about Helium as I go along.

Last night I upgraded from Helium 2 to Helium 3 after playing around with the trial.

Thanks for your continued support.