Extracting Columns from your source table to another table

Questions and answers about anything related to Helium Scraper
Post Reply
massradius
Posts: 20
Joined: Thu May 12, 2011 4:05 pm

Extracting Columns from your source table to another table

Post by massradius » Mon Aug 22, 2011 3:46 pm

I'm using the data from one table as my search criteria on a website. Sometimes it comes back with something close but not quite the same. Right now I'm extracting a bunch of Kinds from the resultant search but I'd also like to write the original search criteria in to the extract table. The "Extract to table" function seems to be limited to kinds...is my understanding correct?

thanks!

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

Re: Extracting Columns from your source table to another tab

Post by webmaster » Tue Aug 23, 2011 3:07 am

You can extract the search query if it's anywhere in the page, even from the search box. To extract the value of a text box just create a kind that selects it, and a javascript gatherer with this code in it:

Code: Select all

return element.value;
If the search query is not anywhere in the page or the URL you would need to store it in a variable with javascript and either extract it from code or save it in a javascript variable and then add it to the current page as a new HTML element that then would be extracted with an Extract action. This would involve some coding though.
Juan Soldi
The Helium Scraper Team

massradius
Posts: 20
Joined: Thu May 12, 2011 4:05 pm

Re: Extracting Columns from your source table to another tab

Post by massradius » Thu Mar 15, 2012 8:09 pm

HI,

In this case is the code actually "return element.value;"? When I set that up it seems to be frequently missing the text in googles search box

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

Re: Extracting Columns from your source table to another tab

Post by webmaster » Fri Mar 16, 2012 6:39 am

Hi,

Yes, that's how you'd get the text in any text box such as where you type your search query in Google. Actually, now there is a gatherer called Value so you don't need to write any JavaScript code. The only possible problems I can think of are, your kind is either selecting other than exactly 1 element in the page, or your kind is not selecting the text box itself. To ensure it selects the right element, press the Select kind in browser button and make sure the OuterHTML starts with the text "<input".
Juan Soldi
The Helium Scraper Team

Post Reply