Jump to content
UBot Underground

How to Pull Info from a .csv file


Recommended Posts

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

Link to post
Share on other sites

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

Link to post
Share on other sites

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.

Link to post
Share on other sites

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 site

set(#username, $table cell(&account info, 0, 1), "Global") <-- Username

set(#pass, $table cell(&account info, 0, 2), "Global") <-- Password

set(#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

Link to post
Share on other sites

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.com

http://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

Link to post
Share on other sites

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.

Link to post
Share on other sites

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.

Link to post
Share on other sites

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.

Link to post
Share on other sites

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.

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...