Problem with put URL and websites

Jim Ault JimAultWins at yahoo.com
Thu Apr 17 03:10:33 EDT 2008


On 4/16/08 9:43 PM, "Phil Davis" <revdev at pdslabs.net> wrote:

> Warning: I don't know much about this kind of thing.
> Is it possible that the TimeSpan item is being set by the
> "drawLocations" JS function in this file?:
> 
> http://content.mqcdn.com/dotcom-release-11-build.19/cdn/js/dojo/dojo.js.result
> s.js
> 
> (That's a ref in the source of your mapquest URL below).
> 
> Phil Davis
> 

You are on the right track, Phil.

This is one of  the techniques web masters use to discourage 'screen
scrapers', which is what
put url whatever.com into tVar
is doing.

The reason I asked Fred 'how much is it worth?' is because simple techniques
won't be successful without a browser or using Rev Http Headers (not easy).

Of course there is RevBrowser, but Fred reported that for him it crashed
Rev.

On a Mac, I would use Applescript from Rev to
[warning: code may not be exactly correct]

tell app "Safari"
set the url of document 1 to theUrlAddress
wait 5 seconds
return the source of document 1
end tell

in Rev
do theScriptForSafari as Applescript
put the result in to pageSource
--

or 
return the text of document 1
--which would be plain text without the tags, etc.

You can use similar on Win.

This TimeSpan  js slows down the robotic programs that basically suck the
precious data from sources like MapQuest and update some other data source.

Hope this helps.

Jim Ault
Las Vegas



On 4/16/08 9:43 PM, "Phil Davis" <revdev at pdslabs.net> wrote:

> Warning: I don't know much about this kind of thing.
> Is it possible that the TimeSpan item is being set by the
> "drawLocations" JS function in this file?:
> 
> http://content.mqcdn.com/dotcom-release-11-build.19/cdn/js/dojo/dojo.js.result
> s.js
> 
> (That's a ref in the source of your mapquest URL below).
> 
> Phil Davis
> 
> 
> 
> Fred moyer wrote:
>> Based on replies I have received (thanks for them) I don't think I
>> explained the situation properly. Let me try again: Until a month ago,
>> I was able to retrieve the drive time between two zip codes by using
>> (for example):
>> 
>>    put "http://www.mapquest.com/maps/01778/03861/" into bunchofText
>> 
>> Up until about a month ago, bunchofText would contain (for example):
>> 
>>    Total Estimated Time: 1 hour 35 minutes
>> 
>> Therefore, it was a simple matter of using offset("Total Estimated
>> Time:", bunchofText) to retrieve the drive time between two zip codes.
>> 
>> Then, suddenly my script didn't work. Using Variable Watcher I found
>> that bunchofText now contains some mysterious code. It now looks like
>> this:
>> 
>>    Total Estimated Time: <span class="timeSpan"
>> id="dirTimeSummary"></span>
>> 
>> Obviously, I now can't retrieve the drive time. Does anyone have any
>> ideas what I should do?  Incidentally, I have tried using revBrowser.
>> But when I use the following script:
>> 
>> on mouseup
>>   put the windowid of this stack into tWinID
>>   put "http://www.mapquest.com/maps/01778/03861/" into tAddress
>>   put revBrowserOpen(tWinID,tAddress) into tBrowserID
>>   revBrowserSet tBrowserID, "showborder","true"
>>   revBrowserSet tBrowserID, "rect",rect of img "browserimage"
>>   put revBrowserGet(tBrowserID,"htmltext")
>> end mouseup
>> 
>> Revolution crashes
>> 
>> Any suggestions/help would be most appreciated!
>> 
>> Thanks
>> Fred Moyer
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>> 





More information about the Use-livecode mailing list