a2mateit 395 Posted December 16, 2011 Report Share Posted December 16, 2011 Hello, I am creating a bot to bookmark websites to pligg sites. When it signs-up it saves the following info into a .csv file: Website Url in first column, username in second column, and password in third column. So how do I pull that info from the .csv to log-in to the site. For example: navigate to website in column 1, use username info from column 2, use password info from column 3, then after it bookmarks it will move on to Row 2 then 3 etc. etc. Justin Quote Link to post Share on other sites
JohnB 255 Posted December 16, 2011 Report Share Posted December 16, 2011 There are a couple of ways to do it. You want to create table from file (choose your csv file) and run your process through a loop where you will use $table cell to call the data. The row will need to be set with a variable (like #row=0) and the columns are 0=url, 1=username and 2=password. When one site is complete (in the loop) then increment #row and the next iteration will use the data from the second row, etc. John Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted December 16, 2011 Report Share Posted December 16, 2011 Here is a small video I did a while back for someone else on working with csv files Hope it helps. Quote Link to post Share on other sites
a2mateit 395 Posted December 16, 2011 Author Report Share Posted December 16, 2011 Thanks guys, I have it pulling the info correctly, but it will not loop through it just keeps doing the same site. What do I put in the number of cycles in loop to get it to run correctly? I am using List total for a list made from the .csv variable. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted December 16, 2011 Report Share Posted December 16, 2011 before your loop set a variable to 0 this is your starting row in the last spot of the loop add a increment to increase that variable. and for the row of each table cell insert the variable Quote Link to post Share on other sites
a2mateit 395 Posted December 16, 2011 Author Report Share Posted December 16, 2011 Thanks guys but I am still stuck. Before my loop I have the following: ui open file("Load Campaign", #campaign)create table from file(#campaign, &account info)set(#url, $table cell(&account info, 0, 0), "Global") <-- URL of siteset(#username, $table cell(&account info, 0, 1), "Global") <-- Usernameset(#pass, $table cell(&account info, 0, 2), "Global") <-- Passwordset(#row, $table cell(&account info, 1, 0), "Global") Then I have loop with my commands inside. (still not sure what to put in as list total to have it go through the entire .csv as it's got over 3,000 sites) Then at the very end of my loop I have the following:increment(#url)increment(#username)increment(#password)increment(#campaign)increment(#row) Hopefully you guys can help me trouble shoot it easier by me giving you specifics of what I have so far. Justin Quote Link to post Share on other sites
a2mateit 395 Posted December 16, 2011 Author Report Share Posted December 16, 2011 I forgot to mention what that the only problem I'm having is it isn't incrementing the rows in the loop command. Everything else is working fine. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted December 16, 2011 Report Share Posted December 16, 2011 Example code: set(#row, 0, "Global") loop($table total rows(&test)) { set(#row0 column0, $table cell(&test, #row, 0), "Global") increment(#row) } Video example:http://screencast.com/t/j0uIeqhK6AgG Quote Link to post Share on other sites
a2mateit 395 Posted December 17, 2011 Author Report Share Posted December 17, 2011 Hey TJ, Thanks for the screen cast. That was exactly what I needed to get it working. I had my set commands for my columns outside of the loop. Thanks again! Justin Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted December 17, 2011 Report Share Posted December 17, 2011 Amnytime... Quote Link to post Share on other sites
a2mateit 395 Posted December 17, 2011 Author Report Share Posted December 17, 2011 Alright so I am running into another issue and decided to post it here instead of creating a new topic. I cannot figure out how to save the url of my bookmark after I bookmark it. Is there anyone familiar with pligg sites that has coded this before and can help me out. Some example of the sites are:http://52.co.nz/http://acoolwaytoshop.comhttp://actorscams.com/http://africanlolo.com/africanlolo I would like to be able to save the bookmark url's for further indexing purposes (pinging, rss, etc. etc.) Anyone that can help it would be greatly appreciated. Justin Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted December 17, 2011 Report Share Posted December 17, 2011 Navigate to your url then do link this example screenshot http://screencast.com/t/yWQaSVy8JwP Quote Link to post Share on other sites
a2mateit 395 Posted December 17, 2011 Author Report Share Posted December 17, 2011 Thanks TJ, I am familiar with saving the url, the problem I am having is navigating to the url. After you submit the bookmark it takes you to a page like:http://52.co.nz/upcoming.php And say my bookmark was the one that says Bing is Awesome. You have to click on that and then it takes you to the url to save. The problem is selecting the right story. I tried to click on the bookmark title variable but it says invalid integer. Totally clueless on how to implement this correctly. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted December 17, 2011 Report Share Posted December 17, 2011 do you know what the bookmark url looks like ie the same http://something.com/%username or whatever you picked here% Something like that where you can put the url together yourself and save it. Quote Link to post Share on other sites
a2mateit 395 Posted December 17, 2011 Author Report Share Posted December 17, 2011 The url looks like this:http://52.co.nz/story.php?title=bing-is-awesome Would it be possible to do a page scrape. With text on left being Bookmark Title and text on right |Discuss? It needs to click on Read More (preferably the element) as I will be submitting to many different languages of websites. Quote Link to post Share on other sites
a2mateit 395 Posted December 17, 2011 Author Report Share Posted December 17, 2011 Okay WTF, I saved my bot, went to eat some dinner and now I come back and I am getting the following error whenever I try to run it. The cell you requested is outside the range of the table. Anyone know what could be causing this as it was working literally like twenty minutes ago and I haven't changed anything. Quote Link to post Share on other sites
a2mateit 395 Posted December 17, 2011 Author Report Share Posted December 17, 2011 Never mind, the bot is working fine now. Still having problems saving the bookmarking url. Been working to hard today Gotta take a break, gonna take my wife out. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted December 17, 2011 Report Share Posted December 17, 2011 Send me what you have so far in PM attach it or email admin@botguru.net Ill take a look and see when it gets to the point where you need to save the bookmark how it can be achieved if you like. Or give a video process of it at which point do you create the bookmark url, or name, etc how its created. Somewhere along those lines you will be able to form the url without being able to see the url. 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.