Code:
### Need to Import ###
from logging import exception
import os, sys, time, re, datetime, random, datetime, colorama, ctypes, threading, ssl, smtplib, pickle
from os import system
from colorama import Fore
### Selenium ###
from selenium import webdriver
from email.message import EmailMessage
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.proxy import Proxy, ProxyType
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
#add opt
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("--disable-blink-features=AutomationControlled")
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-gpu')
chrome_options.add_argument('--ignore-certificate-errors-spki-list')
chrome_options.add_argument('--ignore-ssl-errors')
#Windwos Mode
#os.system('mode con: cols=50 lines=10')
class main:
colorama.init(autoreset=True)
def __init__(self):
# Time for a Gui
print('By Boolty')
## Start Game Time Sending
threading.Thread(target=start, args=()).start()
################ Start Definiton #############
# Start Bot
def start():
print('Valide language is :')
print('us | ar | au | br | ch | gr | dk | it')
lang = input('Choos a language en or de = ')
try:
driver = webdriver.Chrome(options=chrome_options)
## Headles Alternative
driver.minimize_window()
driver.get('https://en.fakenamegenerator.com/gen-random-'+lang+'-'+lang+'.php')
time.sleep(0.5)
print(Fore.GREEN + "Website Ok")
time.sleep(0.5)
except:
print(Fore.RED + "!!Chromedriver nicht gefunden!!")
time.sleep(15)
os._exit(0)
try:
#address = driver.find_element(By.XPATH, "/html/body/div[2]/div/div/div[1]/div/div[3]/div[2]/div[2]/div/div[1]").text
#print('Name and Address')
#print(address)
data = driver.find_element(By.XPATH, "/html/body/div[2]/div/div/div[1]/div/div[3]/div[2]/div[2]/div/div[2]").text
print(data)
time.sleep(0.5)
file = open('dump.txt', 'wb')
pickle.dump(str(data), file)
file.close()
time.sleep(200)
except:
pass
################# End ########################
if __name__ == "__main__":
main = main()
time.sleep(50000)