Skip to content

Instantly share code, notes, and snippets.

View gcunhase's full-sized avatar
🎯
Focusing

Gwena Cunha gcunhase

🎯
Focusing
View GitHub Profile
"""
ByPass Google reCAPTCHA V2
Shahzaib Chadhar
YouTube Channel: NIKO TECH
"""
import urllib
import selenium
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
@gcunhase
gcunhase / recaptcha.py
Created March 20, 2021 06:33 — forked from anton-petrov/recaptcha.py
Solve reCAPTCHA with Selenium + Python
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
# Terminal Cheat Sheet
pwd # print working directory
ls # list files in directory
cd # change directory
~ # home directory
.. # up one directory
- # previous working directory
help # get help
-h # get help
@gcunhase
gcunhase / args2json2args.py
Last active October 25, 2020 17:22
Save and load: args to json to args
# Useful: https://stackoverflow.com/questions/28348117/using-argparse-and-json-together
def save_args2json(args, json_path):
""" Save args in JSON file
:param args: args, from argparse
:param json_path: full path to .JSON file to be saved
"""
argparse_dict = vars(args)
with open(json_path, 'w') as fp:
@gcunhase
gcunhase / translate_en_ko.py
Created September 15, 2020 04:35
Translate "English" to "Korean": hello world
# pip install googletrans
# https://pypi.org/project/googletrans/
from googletrans import Translator
translator = Translator()
translation = translator.translate('hello', src='en', dest='ko')
print(translation.origin, ' -> ', translation.text)