Extracting data from iframe on another domain

Questions & Answers about Helium Scraper 3
Post Reply
yeti
Posts: 22
Joined: Sat Feb 02, 2013 1:01 am

Extracting data from iframe on another domain

Post by yeti » Thu Jan 27, 2022 12:27 pm

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

iframe_link
   Select.Iframe
   Text.Iframe_url
This gets the exact iframe URL.

And I have tried:

Code: Select all

child
   Select.Iframe
   Text.Iframe_url
   Browser.Navigate
   extract
      itemdescription
         Select.Description_raw
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.

webmaster
Site Admin
Posts: 521
Joined: Mon Dec 06, 2010 8:39 am
Contact:

Re: Extracting data from iframe on another domain

Post by webmaster » Fri Jan 28, 2022 11:24 am

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

Text.Iframe_url
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

Select.Iframe
Text.Iframe_url
as url
Browser.Load
   ·  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).
Juan Soldi
The Helium Scraper Team

yeti
Posts: 22
Joined: Sat Feb 02, 2013 1:01 am

Re: Extracting data from iframe on another domain

Post by yeti » Sun Jan 30, 2022 1:40 pm

THANK YOU!

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.

Post Reply