This is a script that scrapes the longitude and latitude on food.grab.com

Related tags

Web Crawling grab
Overview

grab

This is a script that scrapes the longitude and latitude for any restaurant in Manila on food.grab.com, location can be adjusted.

Search Result page

Preview

Prerequisites

  • Python
  • Selenium
  • Chrome Browser and Chrome Driver
  • VPN and the Browser extension for the VPN should be installed in your Chrome browser.
  • Beautiful Soup.
  • Change the driver path in the script to match yours.

Notes

  • Avoid making too many requests. There is a limit and a blocker for webscraping implemented by grab.com that's why you need to increase the timeout.
  • Vpn location can be any country in Asia.
  • Selenium is highly unstable, so at times you might get some errors. Do not fret :) just restart the script.
  • Running the driver as Headless strangely doesn't work properly because of the proxy problem and since i am using a vpn extension you need to use actual proxy addresses to get it working. So the GUI has to pop up. 👀
  • You can adjust the sliced_links depending on how many restaurants longitude and latitude you want to scrape.

Output

Number of pages loaded is  1
Number of pages loaded is  2
Number of pages loaded is  3
['https://food.grab.com/ph/en/restaurant/mcdonald-s-sta-cruz-church-delivery/AWiD5JwQfYWaYaQC4nY4', 'https://food.grab.com/ph/en/restaurant/greenwich-morayta-delivery/2-CYKTRUDUNNVAFE', 'https://food.grab.com/ph/en/restaurant/mang-inasal-morayta-delivery/2-CZDEV76BTREHKE', 'https://food.grab.com/ph/en/restaurant/wendy-s-dapitan-available-for-long-distance-delivery-delivery/PHGFSTI0000017w', 'https://food.grab.com/ph/en/restaurant/angel-s-pizza-legarda-available-for-long-distance-delivery-delivery/PHGFSTI000000zw', 'https://food.grab.com/ph/en/restaurant/jollibee-raon-delivery/2-CZC1EZEYACBTCX', 'https://food.grab.com/ph/en/restaurant/kfc-sta-cruz-delivery/2-CYUZC8BTGJ51GJ', 'https://food.grab.com/ph/en/restaurant/chowking-sta-cruz-manila-delivery/2-CYMHN7DWAGL2WE', 'https://food.grab.com/ph/en/restaurant/coco-fresh-tea-juice-grabkitchen-sampaloc-delivery/2-C2DDLZNZVTV2TA', 'https://food.grab.com/ph/en/restaurant/subway-medical-center-manila-available-for-long-distance-delivery-delivery/PHGFSTI000003e8', 'https://food.grab.com/ph/en/restaurant/yellow-cab-pizza-espana-available-for-long-distance-delivery-delivery/2-CYKCVZNZJTDFLE', 'https://food.grab.com/ph/en/restaurant/three-j-lugawan-earnshaw-street-available-for-long-distance-delivery-delivery/2-C2JTJFEKWCKZLE', 'https://food.grab.com/ph/en/restaurant/army-navy-burger-burrito-ust-dapitan-available-for-long-distance-delivery-delivery/PHGFSTI000000ym', 'https://food.grab.com/ph/en/restaurant/kenny-rogers-roasters-manila-delco-available-for-long-distance-delivery-delivery/2-CYMFVAK2CU5KN6', 'https://food.grab.com/ph/en/restaurant/zark-s-burgers-ust-available-for-long-distance-delivery-delivery/2-C2VZMEUEPGADDA', 'https://food.grab.com/ph/en/restaurant/happilee-korean-kitchen-grabkitchen-sampaloc-available-for-long-distance-delivery-delivery/2-C2JECYXXKF2ATA', 'https://food.grab.com/ph/en/restaurant/boodle-inasal-x-happy-thirstday-sampaloc-available-for-long-distance-delivery-delivery/2-C2J3BF3DSA2YRX', 'https://food.grab.com/ph/en/restaurant/pares-kimchi-intramuros-available-for-long-distance-delivery-delivery/2-CZNKLEUUMBTHCA', 'https://food.grab.com/ph/en/restaurant/something-healthy-ust-available-for-long-distance-delivery-delivery/2-CYVGEUCHNF3ZJN', 'https://food.grab.com/ph/en/restaurant/shakey-s-pizza-espana-delivery/2-CYK2GKKXEKTULJ', 'https://food.grab.com/ph/en/restaurant/papa-john-s-pizza-tri-loyola-building-available-for-long-distance-delivery-delivery/2-CYTZE7BTVVEVDA', 'https://food.grab.com/ph/en/restaurant/pizza-hut-cm-recto-available-for-long-distance-delivery-delivery/2-CYLCMEJHCNTCGJ', 'https://food.grab.com/ph/en/restaurant/macao-imperial-tea-pacific-suites-delivery/PHGFSTI000003fv', 'https://food.grab.com/ph/en/restaurant/turks-recto-delivery/2-CYUJJNU2N6KFTA', 'https://food.grab.com/ph/en/restaurant/serenitea-ust-lacson-available-for-long-distance-delivery-delivery/2-CZJTAAXDGEJABA', 'https://food.grab.com/ph/en/restaurant/food-house-by-madla-ust-delivery/2-CZKJC241LXA1TN', 'https://food.grab.com/ph/en/restaurant/mister-kabab-grabkitchen-sampaloc-available-for-long-distance-delivery-delivery/2-C2JEE7UARFJYEN', 'https://food.grab.com/ph/en/restaurant/grabkitchen-mix-and-match-sampaloc-available-for-long-distance-delivery-delivery/2-C2JTEVCUFFAYA6', 'https://food.grab.com/ph/en/restaurant/dosirakuya-korean-street-food-tondo-available-for-long-distance-delivery-delivery/2-C2MEPBJBLYU2DA', 'https://food.grab.com/ph/en/restaurant/tutong-s-laksa-sampaloc-available-for-long-distance-delivery-delivery/2-C23URRLCNJUTVT', 'https://food.grab.com/ph/en/restaurant/i-love-milktea-tayuman-delivery/2-C2TKT3DVJYUELX', 'https://food.grab.com/ph/en/restaurant/erlinda-s-foodhouse-loyola-street-delivery/2-C2WCFGMANYXTAA', 'https://food.grab.com/ph/en/restaurant/big-scoop-p-guevarra-st-delivery/2-C2UWRYJBTX4JSE', 'https://food.grab.com/ph/en/restaurant/mipanda-milk-tea-hub-lacson-available-for-long-distance-delivery-delivery/2-C2MUNFEKGYAHET', 'https://food.grab.com/ph/en/restaurant/caution-bistro-manila-available-for-long-distance-delivery-delivery/2-C2WFT2UYEUBDCX', 'https://food.grab.com/ph/en/restaurant/24-7-wings-ust-available-for-long-distance-delivery-delivery/2-CYUYBF42AU5ELJ', 'https://food.grab.com/ph/en/restaurant/baliwag-lechon-manok-laong-laan-manila-available-for-long-distance-delivery-delivery/2-C2CGNKTYGA4ZL6', 'https://food.grab.com/ph/en/restaurant/hong-kong-noodles-dimsum-house-quiapo-available-for-long-distance-delivery-delivery/PHGFSTI000001d8', 'https://food.grab.com/ph/en/restaurant/selecta-ice-cream-shop-sta-cruz-delivery/2-CYWFLCNBKFCZJJ', 'https://food.grab.com/ph/en/restaurant/starbucks-puerta-de-isabel-ii-delivery/2-CY42TKKBTKM3LE']
You have scraped 40 links
{'latitude': 14.599870428571428, 'longitude': 120.9797005}
{'latitude': 14.605052185873603, 'longitude': 120.98803399294457}
{'latitude': 14.605344959550562, 'longitude': 120.9881068}
{'latitude': 14.611880266666667, 'longitude': 120.9884545}
{'latitude': 14.599262918622557, 'longitude': 120.9900343411054}
{'latitude': 14.6007231, 'longitude': 120.98439648}
{'latitude': 14.599968222336393, 'longitude': 120.98002192}
{'latitude': 14.599834675, 'longitude': 120.980555425}
You might also like...
Web-scraping - Program that scrapes a website for a collection of quotes, picks one at random and displays it
Web-scraping - Program that scrapes a website for a collection of quotes, picks one at random and displays it

web-scraping Program that scrapes a website for a collection of quotes, picks on

Meme-videos - Scrapes memes and turn them into a video compilations

Meme Videos Scrapes memes from reddit using praw and request and then converts t

This scrapper scrapes the mail ids of faculty members from a given linl/page and stores it in a csv file

This scrapper scrapes the mail ids of faculty members from a given linl/page and stores it in a csv file

WebScraping - Scrapes Job website for python developer jobs and exports the data to a csv file

WebScraping Web scraping Pyton program that scrapes Job website for python devel

:arrow_double_down: Dumb downloader that scrapes the web
:arrow_double_down: Dumb downloader that scrapes the web

You-Get NOTICE: Read this if you are looking for the conventional "Issues" tab. You-Get is a tiny command-line utility to download media contents (vid

Anonymously scrapes onlinesim.ru for new usable phone numbers.

phone-scraper Anonymously scrapes onlinesim.ru for new usable phone numbers. Usage Clone the repository $ git clone https://github.com/thomasgruebl/ph

A Python package that scrapes Google News article data while remaining undetected by Google.

A Python package that scrapes Google News article data while remaining undetected by Google. Our scraper can scrape page data up until the last page and never trigger a CAPTCHA (download stats: https://pepy.tech/project/GoogleNewsScraper)

Scrapes Every Email Address of Every Society in Every University
Scrapes Every Email Address of Every Society in Every University

society-email-scrape Site Live at https://kcsoc.github.io/society-email-scrape/ How to automatically generate new data Go to unis.yml Add your uni Cre

Automatically scrapes all menu items from the Taco Bell website

Automatically scrapes all menu items from the Taco Bell website. Returns as PANDAS dataframe.

Owner
Mux
null
Grab the changelog from releases on Github

release-notes-scraper This simple script can be used to grab the release notes for projects from github that do not keep a CHANGELOG, but publish thei

Dan Čermák 4 Apr 1, 2022
A Python Covid-19 cases tracker that scrapes data off the web and presents the number of Cases, Recovered Cases, and Deaths that occurred because of the pandemic.

A Python Covid-19 cases tracker that scrapes data off the web and presents the number of Cases, Recovered Cases, and Deaths that occurred because of the pandemic.

Alex Papadopoulos 1 Nov 13, 2021
This program scrapes information and images for movies and TV shows.

Media-WebScraper This program scrapes information and images for movies and TV shows. Summary For more information on the program, read the WebScrape_

null 1 Dec 5, 2021
Crawler job that scrapes comments from social media posts and saves them in a S3 bucket.

Toxicity comments crawler Crawler job that scrapes comments from social media posts and saves them in a S3 bucket. Twitter Tweets and replies are scra

Douglas Trajano 2 Jan 24, 2022
An Automated udemy coupons scraper which scrapes coupons and autopost the result in blogspot post

Autoscraper-n-blogger An Automated udemy coupons scraper which scrapes coupons and autopost the result in blogspot post and notifies via Telegram bot

GOKUL A.P 13 Dec 21, 2022
Scrapes mcc-mnc.com and outputs 3 files with the data (JSON, CSV & XLSX)

mcc-mnc.com-webscraper Scrapes mcc-mnc.com and outputs 3 files with the data (JSON, CSV & XLSX) A Python script for web scraping mcc-mnc.com Link: mcc

Anton Ivarsson 1 Nov 7, 2021
Scrapes all articles and their headlines from theonion.com

The Onion Article Scraper Scrapes all articles and their headlines from the satirical news website https://www.theonion.com Also see Clickhole Article

null 0 Nov 17, 2021
A web Scraper for CSrankings.com that scrapes University and Faculty list for a particular country

A web Scraper for CSrankings.com that scrapes University and Faculty list for a particular country To run the file: Open terminal

null 2 Jun 6, 2022
Scrapes the Sun Life of Canada Philippines web site for historical prices of their investment funds and then saves them as CSV files.

slocpi-scraper Sun Life of Canada Philippines Inc Investment Funds Scraper Install dependencies pip install -r requirements.txt Usage General format:

Daryl Yu 2 Jan 7, 2022
Scrapes proxies and saves them to a text file

Proxy Scraper Scrapes proxies from https://proxyscrape.com and saves them to a file. Also has a customizable theme system Made by nell and Lamp

nell 2 Dec 22, 2021