Saving filename "Js_namefound.csv" one per row

Questions and answers about anything related to Helium Scraper
Post Reply
derba
Posts: 27
Joined: Tue May 15, 2012 8:03 pm

Saving filename "Js_namefound.csv" one per row

Post by derba » Sat May 19, 2012 12:23 pm

Hello,

For instance I have a table (resulting from a JOIN SQL query) with 3 columns :
The first column is called "JS_namefound" : it has two rows :
orange
apple

+ column data : it has two rows :
manydata1
manydata2

+ column place : it has two rows :
usa
japan


I would like to save one row and export it with their related "JS_namefound" filename in my computer folder "C:\results\" :
orange.csv (which contains its 3 columns : orange; manydata1;usa)
apple.csv (which contains its 3 columns)


Is it possible ?

note1: I also would be pleased if it is possible to keep only one row all the time (contrarily to two rows in my above example). i.e.: once the csv file is saved, erase the current first row (so in action Helium can crawl my next url). ;)
note2: It also would be a plus to save only one orange.csv file if for instance I have two rows in orange.csv:
orange; manydata1;usa
orange; manydata1_nextpage;empty


Thanks in advance ;)

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

Re: Saving filename "Js_namefound.csv" one per row

Post by webmaster » Sun May 20, 2012 7:25 pm

I'm not getting this. What do you mean by your column JS_namefound having two rows? Can you send a sample CSV and some samples of how you would like your final CSVs to look like?
Juan Soldi
The Helium Scraper Team

derba
Posts: 27
Joined: Tue May 15, 2012 8:03 pm

Re: Saving filename "Js_namefound.csv" one per row

Post by derba » Mon May 21, 2012 9:41 am

Hi,
Sorry for my bad explanations ! ;(
I try to be better this time ; ) :

I create a a table named "table1.csv" from data scraped from the web (or it could also be the result of a joined SQL query).

From "table1.csv" I would like that Helium create by itself 2 other tables "orange.csv" and "apple.csv" :
I have added the csv files in the hereafter link as I could not uplaod them in this forum. ;(
http://www.sendspace.com/filegroup/xETV ... renmOvaqw8

for note1 : the idea (it might be stupid!) is that it would limit the amount of data contained in the database of Helium. Just doing the scrap for one fruit and make the saving as a csv file. Then do the scrap for another fruits...etc...

For note2 : I just added one row in "table1.csv" and named it "table2.csv". I also added the desired "orange.csv" result
http://www.sendspace.com/filegroup/onh1 ... 92okZFmwnA

I hope this is a little more clear now ? ;)
Thanks in advance ;)

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

Re: Saving filename "Js_namefound.csv" one per row

Post by webmaster » Mon May 21, 2012 4:41 pm

Well,

If you can set your actions such that you limit the fruit to be extracted to only one fruit, then you could extract one fruit, then save your CSV, clear the data table and then extract the next fruit (you cannot export programmatically for now but you'll be able to do this in the next update) and so on.

Or you could extract all fruits and then add a WHERE clause to your SQL query to show only one fruit and then export the result of each of these queries.

Is your problem that you have so many fruits that you cannot do this manually for each fruit? And if so, do you need these CSV files to be called the name of whatever fruit you're using (assuming you're actually using fruits)?
Juan Soldi
The Helium Scraper Team

derba
Posts: 27
Joined: Tue May 15, 2012 8:03 pm

Re: Saving filename "Js_namefound.csv" one per row

Post by derba » Mon May 21, 2012 5:08 pm

Hi,
webmaster wrote:Well,

If you can set your actions such that you limit the fruit to be extracted to only one fruit, then you could extract one fruit, then save your CSV, clear the data table and then extract the next fruit (you cannot export programmatically for now but you'll be able to do this in the next update) and so on.

Or you could extract all fruits and then add a WHERE clause to your SQL query to show only one fruit and then export the result of each of these queries.
Yes your two ideas are correct. For the first one I think I can use your explanations in this post and limit the fruit number to 1 instead of 100 (http://www.heliumscraper.com/forum/view ... =485&p=977).

webmaster wrote:Is your problem that you have so many fruits that you cannot do this manually for each fruit? And if so, do you need these CSV files to be called the name of whatever fruit you're using (assuming you're actually using fruits)?
Yes this is right. ;)
I believe I am ready the next version update. ;) ;)

Thanks in advance ;)

derba
Posts: 27
Joined: Tue May 15, 2012 8:03 pm

Re: Saving filename "Js_namefound.csv" one per row

Post by derba » Wed Jun 13, 2012 10:10 am

Hi,

It is possible to do that with the last version 2.3.4 ?
I would be pleased if you can share an example. ;)

Thanks in advance;)

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

Re: Saving filename "Js_namefound.csv" one per row

Post by webmaster » Thu Jun 14, 2012 1:44 am

Hi,

We're still working on this. Most likely will be a javascript function on the next update that will let you specify the name of the exported CSV. Will be glad to give you an example as soon as it's live.
Juan Soldi
The Helium Scraper Team

derba
Posts: 27
Joined: Tue May 15, 2012 8:03 pm

Re: Saving filename "Js_namefound.csv" one per row

Post by derba » Thu Jun 14, 2012 7:15 am

Hi Juan,
Many thanks.;)

Post Reply