fjhuerte 0 Posted March 19, 2010 Report Share Posted March 19, 2010 Hi guys! I need some help! I am new to ubot development. I am almost done with the project at hand but just one issue though.In ebay site, there is price and a shipping cost..For ebay US, it is easy to scrape both data then I could add them and get the final price with shipping cost..but for ebay.ca, I am having a difficult time since both prices are not enclosed in an outer html tag to retrieve them simultaneously.they are not group together unlike in ebay.com wherein the price & shipping cost is inside a outer div. ebay.com<div><td>price</td><td>shipping cost</td></div> ebay.ca<td>prices</td><td>shipping cost</td> could anyone help on how can I scrape this same time so that I could easily add it. Hoping for your help UBOT gurus! Thanks!Francis Quote Link to post Share on other sites
alcr 135 Posted March 20, 2010 Report Share Posted March 20, 2010 ebay.ca is in french for me, and I can't really find any english button...? Quote Link to post Share on other sites
fjhuerte 0 Posted March 20, 2010 Author Report Share Posted March 20, 2010 oh really? mine is in english when I view the site..I am not sure of the reason why yours is in french! Quote Link to post Share on other sites
alcr 135 Posted March 20, 2010 Report Share Posted March 20, 2010 Yeah haha it doesn't really makes sense to me either. Hmm. But can't you just chose one of the td's and scrape them using a wildcard? Quote Link to post Share on other sites
fjhuerte 0 Posted March 21, 2010 Author Report Share Posted March 21, 2010 yes I have scraped it using an outer TR tag with wildcards.Now I have a data of an entire section row.. so the processing of the list begins.. My issue now is I have a text from the scrapped data and I am using the eval function to process a javascript string function, indexOf, to look for a certain character ($). but after the processing, the output is "undefined." I thought the eval function processes javascripts, am I right? For example: * set a variable $ebaydata to "Twilight New Moon Saga: Twilight in Forks DVD *TRAILER* Location: USA Feedback: 305 | 99.5%View similar active items | Sell one like this1 BidSoldC $10.14+C $2.8516-Mar 21:22" * used $eval for the statement "{1}".indexOf("{2}") * {2} is $str1 variable which is set to $ After running the program and outputting it, the result is undefined. Clearly there is a "$" character in the string. It should have outputted the character position. Thanks for all your reply sir alcr! I really appreciate it!Hope you could help me againg with this question. Quote Link to post Share on other sites
alcr 135 Posted March 23, 2010 Report Share Posted March 23, 2010 To be honest, I have actually no idea how the javascript-eval function works. But where are you scraping this data? In the searchengine or at the site of the article? Quote Link to post Share on other sites
Frank 177 Posted April 5, 2010 Report Share Posted April 5, 2010 I just pulled your variable and ran it in a simple bot and it works 100%. Here's the bot that I created: Set - #var1 to $Set - #var2 to 'your string'set - #temp to $eval - "{1}".indexOf("{2}") where 1 is var2 and 2 is var1 Frank 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.