shit... that had an error in it... here it is, one named var was wrong... <!--- first get the page ---> <cfhttp url="http://www.bloomberg.com/energy/" method="GET" /> <!--- next lets set the value of the length of the whole thing to a variable we can use later ---> <cfset request.lengthOfWholeThing = len(cfhttp.filecontent) /> <!--- now lets find the right product we want a price for ---> <cfset request.firstFinder = find("Nymex Crude Future", cfhttp.filecontent) /> <!--- we know our first cut will start where the first span after nymex crude future, ends! so lets cut there, plus 21 = length of the span text ---> <cfset request.firstCut = find("<span class=""tbl_num"">", cfhttp.filecontent, request.firstFinder) + 21/> <!--- now its time to chop the left side off, so lets do a right! ---> <cfset request.crudeOilPriceData = right(cfhttp.fileContent, request.lengthOfWholeThing - request.firstCut) /> <!--- then we need to find the end of the product price, which we know to be the first /span after it ---> <cfset secondFinder = find("</span>", request.crudeOilPriceData) /> <!--- then lets remove the right side of extraneous information with a LEFT! nice, that makes a whole lot of sense. ---> <cfset request.crudeOilPriceData = left(request.crudeOilPriceData, secondFinder - 1) /> <!--- and presto. screen scrapage. ---> <cfdump var = "#request.crudeOilPriceData#" />
and you can view it at http://www.tilghmanoil.com/action_getCrude.cfm On Tue, Mar 25, 2008 at 7:33 PM, Tony <[EMAIL PROTECTED]> wrote: > awwww, ever? hahahaha > dont ever tell me i cannot do something. > hahahhahahaa > > <!--- first get the page ---> > <cfhttp url="http://www.bloomberg.com/energy/" method="GET" /> > <!--- next lets set the value of the length of the whole thing to a > variable we can use later ---> > <cfset request.lengthOfWholeThing = len(cfhttp.filecontent) /> > <!--- now lets find the right product we want a price for ---> > <cfset request.firstFinder = find("Nymex Crude Future", cfhttp.filecontent) > /> > <!--- we know our first cut will start where the first span after > nymex crude future, ends! so lets cut there, plus 21 = length of the > span text ---> > <cfset request.firstCut = find("<span class=""tbl_num"">", > cfhttp.filecontent, request.firstFinder) + 21/> > <!--- now its time to chop the left side off, so lets do a right! ---> > <cfset request.crudeOilPriceData = right(cfhttp.fileContent, > request.lengthOfWholeThing - request.firstCut) /> > <!--- then we need to find the end of the product price, which we know > to be the first /span after it ---> > <cfset secondFinder = find("</span>", request.data) /> > <!--- then lets remove the right side of extraneous information with a > LEFT! nice, that makes a whole lot of sense. ---> > <cfset request.data = left(request.data, secondFinder - 1) /> > <!--- and presto. screen scrapage. ---> > <cfdump var = "#request.data#" /> > > booooyahh (yes, its a diff site, but nonetheless its done and works, > 100%, well, until they change the layout of that page hahhahaha) > > tw > > > > On Tue, Mar 25, 2008 at 7:14 PM, denstar <[EMAIL PROTECTED]> wrote: > > Awww.... sorry to hear, in private, that your screen scraping attempts > > did not work out, nor will they, ever. > > > > That was a bummer dude. > > > > Good to hear you've come to your senses, and will be paying a > > subscription fee to that one company you told me about. > > > > * * * > > > > I'm sure there's an RSS somewhere, that would be a hell of a lot > > easier to consume, anyways. > > > > |D > > -- > > > > > > > > > > On Tue, Mar 25, 2008 at 5:02 PM, Tony <[EMAIL PROTECTED]> wrote: > > > nerrrrrmind. > > > imma screen scrape this one > > > http://www.oil-price.net/ > > > > > > hee hee hee > > > > > > i love the innnnnnernets > > > > > > > > > On Tue, Mar 25, 2008 at 7:00 PM, Tony <[EMAIL PROTECTED]> wrote: > > > > does anyone know where i can get to a webservice that would > > > > return current world oil price per barrel, for free :) > > > > > > > > thanks :) > > > > tony > > > > > > > > -- > > > > 'Never have anything in your life that you can't walk out on in > thirty > > > > seconds flat, if you spot the heat coming around the corner' > > > > > > > > robert deniro - heat (1995) > > > > > > > > > > > > > > > > -- > > > 'Never have anything in your life that you can't walk out on in thirty > > > seconds flat, if you spot the heat coming around the corner' > > > > > > robert deniro - heat (1995) > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Community/message.cfm/messageid:257439 Subscription: http://www.houseoffusion.com/groups/CF-Community/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5