leber026 0 Posted October 31, 2009 Report Share Posted October 31, 2009 What I'm trying to do is pull in a delimited file so I'm using the list_from_text command. This is working but it is creating a 1 dimensional list. How would I split this out. What I want to do is have a csv file with multiple columns, then use those columns for in different lists. Any ideas? Thanks! Quote Link to post Share on other sites
Guest turbolapp Posted November 1, 2009 Report Share Posted November 1, 2009 You would create a create a list with commas to separate your variables and then save them to a .csv. This tutorial includes a .csv list. (Go to 13:00 if you want to skip ahead) http://www.ppc.bz/ubot/ubot-tutorial-blog-comment-seed-list-scraper Quote Link to post Share on other sites
leber026 0 Posted November 1, 2009 Author Report Share Posted November 1, 2009 turbolapp, I think we are on different pages. I understand how to save multiple lists as a csv. What i'm looking to do is input a csv with multiple columns to multiple lists. So from one file I want to populate listA and listB so I can input them into different parts of the website I'm working with. Quote Link to post Share on other sites
webautomationlab 21 Posted November 2, 2009 Report Share Posted November 2, 2009 Select a node. right click, under variables choose add to list give the list a name. under enter a value, give it a sub value (insert list from file/text) this will popup a new box. Enter text this is your variable of your filename, and under delimiter, you can choose | or , or whatever. If it is newline (\n) then right click on a sub and choose $new line from the context menu. hth Quote Link to post Share on other sites
Guest luminus Posted November 2, 2009 Report Share Posted November 2, 2009 Seth and I discussed this and he recommends the following: $list item($list from text($list item($list from file("my file.csv"), 12),","), 4) It would definitely help to get a copy of a few lines of the file you're working with so that we can see if perhaps there's a simpler solution. Quote Link to post Share on other sites
leber026 0 Posted November 2, 2009 Author Report Share Posted November 2, 2009 Seth and I discussed this and he recommends the following: $list item($list from text($list item($list from file("my file.csv"), 12),","), 4) It would definitely help to get a copy of a few lines of the file you're working with so that we can see if perhaps there's a simpler solution. I will give this a go. The file will be pretty simple. I created it in excel, a copy is attached. I can see me using this further down the road so the file might change a little. Thanks for the help. Quote Link to post Share on other sites
Guest jackfitz Posted November 3, 2009 Report Share Posted November 3, 2009 Seth and I discussed this and he recommends the following: $list item($list from text($list item($list from file("my file.csv"), 12),","), 4) It would definitely help to get a copy of a few lines of the file you're working with so that we can see if perhaps there's a simpler solution. I have been trying to do this exact same thing. this is as far as I could get Any suggestions? The CSV has 3 columns. Site, User Name, Password. file attached http://img689.imageshack.us/img689/8796/lists.png Quote Link to post Share on other sites
Guest jackfitz Posted November 5, 2009 Report Share Posted November 5, 2009 After some help from Seth here is the correct way to call a .csv file After you have made the list you need to call each delimiter. http://img134.imageshack.us/img134/1930/200911051840.png Quote Link to post Share on other sites
leber026 0 Posted November 5, 2009 Author Report Share Posted November 5, 2009 jackfitz, Your last post will read in a .csv just fine. But it won't split a csv with multiple columns into multiple lists. Quote Link to post Share on other sites
bluegoat 24 Posted November 6, 2009 Report Share Posted November 6, 2009 jackfitz, Your last post will read in a .csv just fine. But it won't split a csv with multiple columns into multiple lists. I've attached a bot that will split a CSV file and show the results in the stats monitor. Just enter either 0, 1, or 2 for the row you want returned. hth Quote Link to post Share on other sites
leber026 0 Posted November 6, 2009 Author Report Share Posted November 6, 2009 Cool, thanks for the example. It looks like you guys are thinking about this a little different that I was. Time for me to re-adjust Thanks again. Quote Link to post Share on other sites
Guest jackfitz Posted November 9, 2009 Report Share Posted November 9, 2009 Thanks jackfitz, Your last post will read in a .csv just fine. But it won't split a csv with multiple columns into multiple lists. I've attached a bot that will split a CSV file and show the results in the stats monitor. Just enter either 0, 1, or 2 for the row you want returned. hth Quote Link to post Share on other sites
sonneti 0 Posted November 16, 2009 Report Share Posted November 16, 2009 jackfitz, Your last post will read in a .csv just fine. But it won't split a csv with multiple columns into multiple lists. I've attached a bot that will split a CSV file and show the results in the stats monitor. Just enter either 0, 1, or 2 for the row you want returned. hth Cheers for the example Quote Link to post Share on other sites
Guest turbolapp Posted November 18, 2009 Report Share Posted November 18, 2009 Crap. I'm completely not getting this concept. Would someone mind doing a jing tutorial or something? Edit: nm. Finally got bluegoat's example to work (stupid user error) and it all makes much more sense now. I'll try it again and see how far I get. Quote Link to post Share on other sites
s1ickwi11y 0 Posted December 2, 2009 Report Share Posted December 2, 2009 I'm trying to use this method to read a multiple column list. My delimiter is a double pipe (||) and I'm totally stuck. Firstly, it's only adding the first column {0} to the field. Not the second column {1} from the cells list. I'm confused. I think I'm close though. The goal is to loop through ALL of the rows automatically without any user input. I'll add the appropriate delay commands and things for interacting with the page later, but I can't even get the loop to work right. I did take care to clear the list variables at the top as you'll see. Screenshot attached. Quote Link to post Share on other sites
Seth Turin 224 Posted December 2, 2009 Report Share Posted December 2, 2009 hey check out the csv tutorial that I just put up. it's posted on http://botsoftware.org/tutorials.aspx. from the tutorials page, click the csv tutorial link. Quote Link to post Share on other sites
s1ickwi11y 0 Posted December 2, 2009 Report Share Posted December 2, 2009 That's the funny thing. I was following those tutorials and ended up here. I'll check them out again. I'm betting it's just something simple that I'm overlooking. Any comments on my script are greatly appreciated. Quote Link to post Share on other sites
s1ickwi11y 0 Posted December 3, 2009 Report Share Posted December 3, 2009 I've copied that video to the letter and for some reason I cannot get it to loop to the second row in the file. It doesn't go past the first row. Any ideas? Here's the completed file... Also, not sure if it's just me, but any replies notifying me of forum updates to threads I'm subscribed to don't get to me. Quote Link to post Share on other sites
Guest Jim Posted December 3, 2009 Report Share Posted December 3, 2009 I've copied that video to the letter and for some reason I cannot get it to loop to the second row in the file. It doesn't go past the first row. Any ideas? Here's the completed file... try clearing your %items list inside the beginning of your loop, before you do the 'add to list'. Quote Link to post Share on other sites
s1ickwi11y 0 Posted December 3, 2009 Report Share Posted December 3, 2009 We're all good. Thanks Seth! In short, I had the clear at the top of the list rather than at the end of the loop before it loops again. S'all good... Quote Link to post Share on other sites
bluegoat 24 Posted December 3, 2009 Report Share Posted December 3, 2009 Not sure if it's a bug or a feature, but when I tried the double pipe "||" as the delimiter in one of my scripts, UBot wouldn't recognize the second pipe. It only reads the first one. So I could use "|" as the delimiter in my file, and in UBot I could use "|asdf" as the delimiter and it will read as if I only used "|" Quote Link to post Share on other sites
s1ickwi11y 0 Posted December 3, 2009 Report Share Posted December 3, 2009 Interesting. I'm not sure. It seems to be reading my || just fine, but I notice that the only way to call the second item is to use {2}. I would have thought this would have been {1}, but instead, {1} seems to be referencing the delimiter itself. Example: text #1||text #2 Anyone else have experience with this? What I've done works...just wondering why it was setup this way. No biggie. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.