This file contains 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.webdriver.common.keys import Keys | |
from time import sleep | |
import unicodecsv as csv | |
import argparse | |
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.common.exceptions import TimeoutException |
This file contains 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 lxml import html, etree | |
import requests | |
import re | |
import os | |
import sys | |
import unicodecsv as csv | |
import argparse | |
import json | |
def parse(keyword, place): |
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Written as part of | |
import requests | |
from lxml import html | |
import re | |
from time import time | |
import json | |
import argparse |
This file contains 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
#!/usr/bin/env python | |
from datetime import datetime | |
from time import time | |
from lxml import html,etree | |
import requests,re | |
import os,sys | |
import unicodecsv as csv | |
import argparse | |
def parse(locality,checkin_date,checkout_date,sort): |
This file contains 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
# -*- coding: utf-8 -*- | |
from lxml import html | |
import requests | |
from collections import OrderedDict | |
import json | |
import argparse | |
import re | |
import sys | |
# Adjust MAX_RETRY according to the blocking from tripadvisor | |
MAX_RETRY = 10 |
This file contains 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 | |
import json | |
import unicodecsv as csv | |
import argparse | |
from argparse import RawTextHelpFormatter | |
def parse(location,sort): | |
print "Retrieving Location Details" | |
location_details_url = "https://www.viator.com/ajaxSegmentSearch.jspa?term=%s"%(location) | |
location_response = requests.get(location_details_url).text |
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Written as part of https://www.scrapehero.com/how-to-scrape-amazon-product-reviews-using-python/ | |
from lxml import html | |
import json | |
import requests | |
import json,re | |
from dateutil import parser as dateparser | |
from time import sleep |
This file contains 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 lxml import html | |
import json | |
import requests | |
from exceptions import ValueError | |
from time import sleep | |
import re,urllib | |
import argparse | |
def parse(url): | |
# url = "https://www.yelp.com/biz/frances-san-francisco" |
This file contains 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 lxml import html | |
import unicodecsv as csv | |
import requests | |
# from exceptions import ValueError | |
from time import sleep | |
import re,urllib | |
import argparse | |
import traceback | |
def parse(url): |
This file contains 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 lxml import html | |
import csv | |
import os | |
import requests | |
from exceptions import ValueError | |
from time import sleep | |
from random import randint | |
def parse(url): | |
headers = { |