Jump to content
UBot Underground

need help scripting amazon product search results


Recommended Posts

thanx kevin

your code showed me that it did not need to be so complicated,( just give the loop a set number of times to loop) but i have another problem. I understand, I just find the total number of items and divide by 10, but how do you convert a string to a intiger to perform math on it.

scraping the total number of items and performing ($eval (%totalitems /10)) gives the error cannot divide two strings

Link to post
Share on other sites

Hi,

 

($eval (%totalitems /10))

Is %totalitems a list? The % is used for ubot lists.. To get count of total items in a list use $list total(%totalitems).

($eval ($list total(%totalitems) / 10))

 

Kevin

Link to post
Share on other sites

this is the problem .

amazon search shows 250 items "1 - 10 of 250 Results" , I page scrape the left side(of) ---right side (Results)

= %item count or #item count

that gives me 250 to add as a line in a list or make a variable, in this case , the math would be

 

****************************************

**************this fails "cannot divide 2 strings****************

set loop count= (($eval (%item count or #item count / 10))

**************************************************************************

 

I want to use loop times (loop count)

Link to post
Share on other sites

thanx for your input but thats not where i was going.

I could just give the loop count a a number of 100 and pretty much be sure to get all the links.

But the object was to be able to figure out how many loops if the item count were to change.(this bot will go thru

all amazon items i wish to sell and add the links to a link list script. and then i can rss blast all catagories and build

indivisual pages to search engine market.

 

I have made progress in isolating the number of total items.

since the first page will always show " Showing 1-10 of ### Results"

I just did a replace (Showinf 1 -10 of) = " "

replace (Results) = " "

but I still cant do math funtions (* \ + -) on ###

 

p.s. I understand that sooner or later I will have to learn regex, it will make future projects easier

Link to post
Share on other sites

Have you tried scraping the number of results aka ###, and then setting that as a variable and calling it in a loop as the number of cycles?

 

That should accomplish what you are trying to do without needing to do any math. :rolleyes:

 

If you give me an exact url, I can try to mock something up for you.

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