Skip to content

Instantly share code, notes, and snippets.

View Ramhm's full-sized avatar
👾

Ramin Hakimi Ramhm

👾
View GitHub Profile
@Ramhm
Ramhm / save_screenshot.py
Created February 12, 2021 14:59 — forked from fabtho/save_screenshot.py
make full screenshot with selenium in python
#!/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')
@Ramhm
Ramhm / bot.py
Created February 12, 2021 14:58 — forked from stevenctl/bot.py
Python Selenium Reusable Browser Session
# 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'
@Ramhm
Ramhm / youtube_comment_bot.py
Created February 12, 2021 14:57 — forked from streetgt/youtube_comment_bot.py
Youtube Comment Bot - python
#!/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
@Ramhm
Ramhm / instabot1.py
Created February 12, 2021 14:31 — forked from fnneves/instabot1.py
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')
@Ramhm
Ramhm / db_backup.sh
Created September 16, 2019 06:46 — forked from NARKOZ/db_backup.sh
MySQL backup shell script
#!/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