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
# Solution found @ http://stackoverflow.com/a/31803008: | |
from selenium import webdriver | |
import requests | |
driver = webdriver.Chrome() | |
fake_lat = "37.773972" | |
fake_long = "-122.431297" |
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.support.ui import WebDriverWait | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support import expected_conditions as EC | |
import requests | |
import os | |
def download_all_papers(base_url, save_dir, driver_path): | |
driver = webdriver.Chrome(driver_path) |
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.common.by import By | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.webdriver.common.keys import Keys | |
import time | |
import csv | |
path_to_chromedriver = '/Users/Jamie/Projects/Propolis_Stuff/chromedriver' # change path as needed |
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
#encoding:utf-8 | |
# example of how to use https://github.com/SeleniumHQ/selenium/blob/master/py/selenium/webdriver/support/expected_conditions.py | |
from selenium import webdriver | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.webdriver.support.wait import WebDriverWait | |
from selenium.webdriver.common.by import By | |
import unittest |
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
#!/usr/bin/env python | |
################################################################################ | |
import sys | |
from time import sleep | |
from selenium import webdriver | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.webdriver.common.by import By | |
from selenium.common.exceptions import NoSuchElementException |
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
# python package | |
import csv | |
import time | |
import random | |
import sys | |
import os | |
# selenium package | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys |
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.common.by import By | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from pyquery import PyQuery as pq | |
# Set options | |
options = webdriver.ChromeOptions() | |
options.add_argument('headless') |
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
#@yasinkuyu 08/09/2017 | |
# install luminati (https://luminati.io) proxy manager & run | |
from selenium import webdriver | |
from selenium.webdriver.common.proxy import Proxy, ProxyType | |
from selenium.webdriver.chrome.options import Options | |
from selenium.webdriver.common.proxy import * | |
PROXY = '127.0.0.1:24000' |
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.chrome.options import Options | |
from BeautifulSoup import BeautifulSoup | |
import time | |
NAME = "Mom" | |
RELOAD_TIMEOUT = 1 | |
ERROR_TIMEOUT = 5 | |
NUM_CYCLES = 10 | |
FIREFOX_PATH = "/Users/sgrover/Library/Application Support/Firefox/Profiles/9w4h7jdq.default" |
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.chrome.options import DesiredCapabilities | |
from selenium.webdriver.common.proxy import Proxy, ProxyType | |
import time | |
co = webdriver.ChromeOptions() | |
co.add_argument("log-level=3") | |
co.add_argument("--headless") |