Jump to content
UBot Underground

Saving a tree structure in a csv


Recommended Posts

http://docs.oracle.com/cd/E19455-01/806-2901/images/fmroottree.tiff.gif

 

The above tree structure is what Im trying to achieve in a file (as a sort of reporting system based on what data ubot pulls in)

 

Simply put, I have 1 keyword (like the HOME folder in the img). ubot uses that KW to scrape another 4 (fish, freshwaterfish,new folder,oceanfish in the pic). Then it uses thosenewly scrapped KW's to scrape new ones (bait and seafood in the img).

 

My question is how would I go about saving this in a csv file.Initially i thought that HOME would be in csv cell A1 (remember that this image only shows a single HOME folder, but I have around 100 HOME folders in column A of the csv - simply put, a bunch of around 100 scrapped KW's from Google) and then FISH would be in B1, then FRESHWATERFISH would be in B2 and NEW FOLDER would be in B3..

 

 

The problem with this is that if I fill up B2 and B3 cells with this scrapped data of the KW in A1, what happens when I reach cell A2 or A3... its going to overright all the saved data in B2, B3,C2,C3 etc..

 

 

 

 

What is a much simplier methods to save such complex data

Link to post
Share on other sites

i would just use columns, and where the split happens, would be a new column, it might get messy, so maybe a new table for each root keyword?

 

I would then use the table structure to control the file and folder structure

Link to post
Share on other sites

Hmmm, but I wanted to know whether there any other way to do that! Creating folders for each main KW, is not at all feasible. Consider that I have 100 main KW's that would mean 100 folders. That is way too much. How do you guys go about the automation of KW research bots? Do you guys not save things in such tree structures?

Link to post
Share on other sites

What do you mean by reference? Do you mean each KW would be on a new sheet in the excel file and then the 1st sheet would contain hyperlinks to these other tabs?

 

There simply has to be some other way in which it becomes possible to save these KW's.. Think ugakebet.. think!

Link to post
Share on other sites

By reference I mean pointing to another file from CSV, you can imagine that as sheets if you want.

 

There is a better way, its called database. UBot already supports MySQL, so you can connect to any MySQL DB and save/read any data from there, and you can also create more complex data structures.

Link to post
Share on other sites

By reference I mean pointing to another file from CSV, you can imagine that as sheets if you want.

 

There is a better way, its called database. UBot already supports MySQL, so you can connect to any MySQL DB and save/read any data from there, and you can also create more complex data structures.

 

 

MySQL.. that seems interesting. but Isnt mysql also similar to an excel sheet? I would then have to create 100 tables for the main KW's, correct?

Link to post
Share on other sites
  • 2 weeks later...

You'd have 3 tables, lets call them: Level1, Level2, Level3. Level1 table would have 100 rows, 1 for each kw. Strictly following your example above Level2 table would have 100 x 4 rows. And Level3 table would have 100 x 4 x 2 rows.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...