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
| #!/bin/bash | |
| # Shell script to backup MySQL database | |
| # Set these variables | |
| MyUSER="" # DB_USERNAME | |
| MyPASS="" # DB_PASSWORD | |
| MyHOST="" # DB_HOSTNAME | |
| # Backup Dest directory | |
| DEST="" # /home/username/backups/DB |
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.keys import Keys | |
| from time import sleep, strftime | |
| from random import randint | |
| import pandas as pd | |
| chromedriver_path = 'C:/Users/User/Downloads/chromedriver_win32/chromedriver.exe' # Change this to your own chromedriver path! | |
| webdriver = webdriver.Chrome(executable_path=chromedriver_path) | |
| sleep(2) | |
| webdriver.get('https://www.instagram.com/accounts/login/?source=auth_switcher') |
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 | |
| # -*- coding: utf-8 -*- | |
| # Python bot for comment a list of urls in YouTube | |
| import time | |
| import numpy as np | |
| from selenium import webdriver | |
| from selenium.webdriver.common.by import By | |
| from selenium.webdriver.support.ui import WebDriverWait |
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
| # Sometimes I have some tedious thing to do like data entry | |
| # Sometimes I script that tedious thing using selenium | |
| # Sometimes I have to login to something to enter that data | |
| # This allows you to rerun your script using the same session | |
| from selenium import webdriver | |
| from selenium.webdriver.chrome.options import Options | |
| import os | |
| SELENIUM_SESSION_FILE = './selenium_session' |
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/python | |
| from selenium import webdriver | |
| from PIL import Image | |
| from cStringIO import StringIO | |
| verbose = 1 | |
| browser = webdriver.Firefox() | |
| browser.get('http://stackoverflow.com/questions/37906704/taking-a-whole-page-screenshot-with-selenium-marionette-in-python') |
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.proxy import Proxy | |
| from selenium.webdriver.common.keys import Keys | |
| from selenium.webdriver.common.desired_capabilities import DesiredCapabilities | |
| from selenium.webdriver.chrome.options import Options | |
| import zipfile,os | |
| def proxy_chrome(PROXY_HOST,PROXY_PORT,PROXY_USER,PROXY_PASS): | |
| manifest_json = """ | |
| { |
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
| # Copyright (c) 2016 Kenneth Blomqvist | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
| # | |
| # The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
| # | |
| # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFT |
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.support import expected_conditions as EC | |
| from selenium.webdriver.common.by import By | |
| from selenium.webdriver.common.keys import Keys | |
| def message(to,message=''): | |
| """this a simple function to send a whatsapp message to your friends | |
| and group using python and selenium an automated tool to parse the HTML | |
| content and to change the properties. |
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
| import re, csv | |
| from time import sleep, time | |
| from random import uniform, randint | |
| from selenium import webdriver | |
| from selenium.webdriver.common.by import By | |
| from selenium.webdriver.support.wait import WebDriverWait | |
| from selenium.webdriver.common.action_chains import ActionChains | |
| from selenium.webdriver.support import expected_conditions as EC | |
| from selenium.common.exceptions import NoSuchElementException |
OlderNewer