0

The URL to the Restaurant's website seems to be encoded in a way that it is not scrapable by a bot, yet when clicked on by a user, the URL loads in a new window:

http://www.tripadvisor.com/Restaurant_Review-g57415-d805527-Reviews-Harrison_s_Restaurant_Bar-Stowe_Vermont.html

The source for the span tag for the 'Website' link is below. How is tripadvisor obscuring/encoding the URL? Is there a way to replicate this or an existing library with similar functionality available?

<span class="taLnk hvrIE6" onclick="ta.trackEventOnPage('AttractionContactInfo', 'Website', 
805527, 1); ta.util.cookie.setPIDCookie(15190); ta.call('ta.util.link.targetBlank', event, this
 {'aHref':'LqMWJQiMnYeVtIJpEJCIQQoqnQQxGEcQQoqnQQeVtIJpEJCIQQoqnQQeVsSVuWJQzZYUWJQpEcYGII26Xomb
QQoqnQQQQoqnqgoqnQQQQoqnQQQQoqnQQQQoqnqgoqnQQQQoqnQQuuuQQoqnQQQQoqnxioqnQQQQoqnQQGJEEStiCttIiuV
QQoqnQQQQoqnxioqnQQQQoqnQQniaQQoqnQQQQoqnqgoqnQQQQoqnQQWJQzhYXHTHVdnM3XokX3nKJB', 
'isAsdf':true})" class="taLnk hvrIE6">Website</span>
James Conr
  • 65
  • 2
  • 6

1 Answers1

0

Try the easy way before of each href link put the follow change

normal way http://www.google.cl

new way http%3A%2F%2Fwww.google.cl

just put the http%3A%2F%2F before the page

  • Found a better solution and works on all browsers you can obfuscate like this " eval(function(p,a,c,k,e,d){e=function(c){return c};if(!''.replace(/^/,String)){while(c--){d[c]=k[c]||c}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('0.1.2',3,3,'www|google|com'.split('|'),0,{})) " –  Oct 25 '14 at 09:20
  • You can [edit] your answer to update it. Oh, and you can use code markup: inline code inbetween `, code blocks with four spaces. – unor Oct 28 '14 at 11:31