Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| from bs4 import BeautifulSoup as bs | |
| import pandas as pd | |
| root_url = "https://www2.reservebar.com" # products' addresses will be appended to this root URL | |
| payload={} # an empty data payload | |
| # headers for our request | |
| headers = { | |
| 'authority': 'www2.reservebar.com', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #defining anticaptcha function | |
| def acp_api_send_request(driver, message_type, data={}): | |
| message = { | |
| # this receiver has to be always set as antiCaptchaPlugin | |
| 'receiver': 'antiCaptchaPlugin', | |
| # request type, for example setOptions | |
| 'type': message_type, | |
| # merge with additional data | |
| **data | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from selenium import webdriver | |
| from selenium.webdriver import Chrome, ChromeOptions, Remote, FirefoxOptions | |
| from selenium.webdriver.common.by import By | |
| import requests | |
| from selenium.webdriver.support.wait import WebDriverWait | |
| from selenium.common.exceptions import NoSuchElementException | |
| import time | |
| options = ChromeOptions() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Started: 2/9/21, target: 2/11/21 | |
| # importing libraries | |
| import ctypes | |
| import json | |
| import sys | |
| import time | |
| from typing import List | |
| import selenium.webdriver | |
| from selenium.webdriver import ActionChains |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # # This version of dordash scraping code has only 2 differences with doordash 2.1. | |
| # 1- can add a manual string for location in the terminal, with the script name | |
| # 2- end process on completion of target | |
| # 3- can scroll to the particular target at any location, without bothering its coordinates | |
| # importing required libraries | |
| import ctypes | |
| import time | |
| from typing import List | |
| import pandas as pd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This version of doordash scraping contains an improvement to doordash 2.0, which | |
| # failed to scrape. | |
| # But, this does not includes the manual string option for stores' location | |
| # Restaurants' Menu Scraping (doordash.com) [operation 1] | |
| # This scraper will navigate to doordash.com. Then it will browse for a specific food type at | |
| # the bottom of the main page under the "Top Cuisines Near You" tab. After the page is loaded, it | |
| # will first evaluate the number of pages for the searched project at a specific location and then | |
| # total number of stores per page. As a next step, it will loop through all the stores and all the |