Jump to content
UBot Underground

comparing a list in ubot with a file on my computer


Recommended Posts

I don't know about the rest of you, but I compulsively check my affiliate programs every few hours to see if I've made any sales. so............ I thought a bot coupled with the task manager would be the perfect solution to feed my addiction.

 

I've created a file on my desktop called 'previous affiliate sales.txt' then I scrape my affiliate sales data and save it to a list called '%current affiliate sales'

 

My question is...

 

Can I create an 'If' statement using:

 

IF, %current affiliate sales = C:\Documents and Settings\Owner\Desktop\previous affiliate sales.txt

THEN, stop (and be sad)

ELSE, send me an email

 

Or are there other steps that have to be taken to compare the file with the list. (Things like: read list, compare, etc.)

Link to post
Share on other sites

I don't know about the rest of you, but I compulsively check my affiliate programs every few hours to see if I've made any sales. so............ I thought a bot coupled with the task manager would be the perfect solution to feed my addiction.

 

I've created a file on my desktop called 'previous affiliate sales.txt' then I scrape my affiliate sales data and save it to a list called '%current affiliate sales'

 

My question is...

 

Can I create an 'If' statement using:

 

IF, %current affiliate sales = C:\Documents and Settings\Owner\Desktop\previous affiliate sales.txt

THEN, stop (and be sad)

ELSE, send me an email

 

Or are there other steps that have to be taken to compare the file with the list. (Things like: read list, compare, etc.)

 

You can do it.

 

But before you start, you need to define EXACTLY how the data is going to be scraped, stored, retrieved, and compared. Only you know those little details.

 

A lot of this is going to be how the data is laid out on the afilliate sales page. If they use some sort of navigation scheme (like the google search footer) and you happen to make lots of sales everyday, its going to be a little more complicated as you have to navigate those links. If so, you probably need a UI drop down where you specify how many pages to scrape.

 

What it will boil down to is you opening up the previous saved file into a list. Assume that list is ordered from newest date to oldest.

 

You would then go to the website with the affilate sales page and scrape it line by line. This too has to be ordered by newest to oldest sales date. Store this in a second list.

 

Realize at this point, there is going to be partial overlap of some sales between the second list and the first list.

 

You then loop over the second list line by line inserting into the top of the first list. For every item that doesn't match, its a new sale. Add that to a third list (the new sales list).

 

Save the first list.

 

Finally, create an HTML page generated from the third list (the new sales list) showing the total number of new sales, the total gross sales, and a nice table of each sale made.

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