{"id":327,"date":"2017-10-09T16:09:54","date_gmt":"2017-10-09T14:09:54","guid":{"rendered":"http:\/\/www.labo.mathieurella.fr\/?p=327"},"modified":"2019-02-25T10:53:12","modified_gmt":"2019-02-25T09:53:12","slug":"i-scrap-trip-advisor-using-google-sheet","status":"publish","type":"post","link":"https:\/\/www.labo.mathieurella.fr\/?p=327","title":{"rendered":"I Scrap Trip Advisor Using Google Sheet"},"content":{"rendered":"<p>Between school returns, those of clients and personal projects. I don&#8217;t have enough time so I&#8217;ll be concise.<\/p>\n<p>First, let&#8217;s rephrase the context:<br \/>\nDuring a Growth Hacking course we had to launch a product and get a maximum of feedback in 1 week&#8230; the rather vague instructions just had to be worked out to validate an MVP (minimum viable product) while respecting the AARRR framework.<\/p>\n<p>The idea of the group:<br \/>\nWe play the role of an importer of Brazilian products looking for potential new customers (restaurant).<\/p>\n<p>dinner event, landing page, social networks&#8230;.. not bad for finding qualified lead but not enough.<\/p>\n<p>So how do we expand this base?<\/p>\n<p>By Scrapping Trip Advisor&#8230; finally we get to the heart of the matter<\/p>\n<p>Let&#8217;s start with Adrien Lachaize scrapping small definition:<br \/>\n&#8220;Web Scraping is a technique for extracting information from websites. This technique focuses mainly on the transformation of unstructured data (HTML format) on the web into structured data (database or spreadsheet).&#8221;<\/p>\n<p>In our case, a restaurant&#8217;s page on Trip Advisor always follows the same architecture, which makes it much easier to extract data.<br \/>\nOften we read occasionally that it is necessary to make scripts in python, javascript etc. passing the art of scrapping as a complicated practice&#8230;.. but this is not true (in most cases;)<\/p>\n<p>Here we use only a macro in google sheet and 2, 3 HTML knowledge.<br \/>\nThis macro allowed us to get the information we needed: name, address, Tel, Mail and that&#8217;s all.<\/p>\n<p>The most complicated thing to do is to retrieve the links an example of a querie exists in the header &#8211;> use it with the Mozbar extension to collect all the links from a google search \ud83d\ude09 <\/p>\n<p>Here is the link to observe, understand the macro&#8230; If you ever want to use it create a copy in your drive.<\/p>\n<p>link : <a href=\"https:\/\/docs.google.com\/spreadsheets\/d\/1l-BAjkY4pIeutYeqeJ_peakuZJnchL5vPQrpQd4hzCc\/edit?usp=sharing\"> Trip Advisor Scrapper<\/a><\/p>\n<p>If the trip advisor interface is redesigned, chances are it won&#8217;t work anymore if it does, I let you tweak the macro by changing the div and span names<\/p>\n<p>and be careful not to make too many requests, they slow us down to a certain number <\/p>\n<p>See you in the next One \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Between school returns, those of clients and personal projects. I don&#8217;t have enough time so I&#8217;ll be concise. First, let&#8217;s &#8230;<\/p>\n","protected":false},"author":1,"featured_media":331,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.labo.mathieurella.fr\/index.php?rest_route=\/wp\/v2\/posts\/327"}],"collection":[{"href":"https:\/\/www.labo.mathieurella.fr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.labo.mathieurella.fr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.labo.mathieurella.fr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.labo.mathieurella.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=327"}],"version-history":[{"count":3,"href":"https:\/\/www.labo.mathieurella.fr\/index.php?rest_route=\/wp\/v2\/posts\/327\/revisions"}],"predecessor-version":[{"id":330,"href":"https:\/\/www.labo.mathieurella.fr\/index.php?rest_route=\/wp\/v2\/posts\/327\/revisions\/330"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.labo.mathieurella.fr\/index.php?rest_route=\/wp\/v2\/media\/331"}],"wp:attachment":[{"href":"https:\/\/www.labo.mathieurella.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.labo.mathieurella.fr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.labo.mathieurella.fr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}