Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

one of the argument is required #29

Open
priyaank2004 opened this issue Mar 25, 2021 · 5 comments
Open

one of the argument is required #29

priyaank2004 opened this issue Mar 25, 2021 · 5 comments

Comments

@priyaank2004
Copy link

Do i even need to put firefox driver path also.....I put google driver path and it said one of the arguement __firefox __chrome is required. i dont understand. can you tell me a fix

@whitedwarf-irfan
Copy link

Same Problem

@priyaank2004
Copy link
Author

Same Problem

I got it fixed- Just replace botaccountcreate.py with this-
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from fake_useragent import UserAgent
import accountInfoGenerator as account
import getVerifCode as verifiCode
from selenium import webdriver
import fakeMail as email
import time
from selenium.webdriver.chrome.options import Options

options = Options()
ua = UserAgent()
userAgent = ua.random
print(userAgent)
options.add_argument(f'user-agent={userAgent}')
driver = webdriver.Chrome(options=options, executable_path=r"C:\Program Files\Google\Chrome\Application\chromedriver.exe")
driver.get("https://www.instagram.com/accounts/emailsignup/")
time.sleep(8)
name = account.username()
fame = account.getPassword()

#Fill the email value
email_field = driver.find_element_by_name('emailOrPhone')
fake_email = email.getFakeMail()
email_field.send_keys(fake_email)
print(fake_email)

Fill the fullname value

fullname_field = driver.find_element_by_name('fullName')
fullname_field.send_keys(account.generatingName())
print(account.generatingName())

Fill username value

username_field = driver.find_element_by_name('username')
username_field.send_keys(name)
print(name)

Fill password value

password_field = driver.find_element_by_name('password')
password_field.send_keys(fame) # You can determine another password here.
print(fame)
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//*[@id='react-root']/section/main/div/div/div[1]/div/form/div[7]/div/button"))).click()

time.sleep(8)

#Birthday verification
driver.find_element_by_xpath("//[@id='react-root']/section/main/div/div/div[1]/div/div[4]/div/div/span/span[1]/select").click()
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//
[@id='react-root']/section/main/div/div/div[1]/div/div[4]/div/div/span/span[1]/select/option[4]"))).click()

driver.find_element_by_xpath("//[@id='react-root']/section/main/div/div/div[1]/div/div[4]/div/div/span/span[2]/select").click()
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//
[@id='react-root']/section/main/div/div/div[1]/div/div[4]/div/div/span/span[2]/select/option[10]"))).click()

driver.find_element_by_xpath("//[@id='react-root']/section/main/div/div/div[1]/div/div[4]/div/div/span/span[3]/select").click()
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//
[@id='react-root']/section/main/div/div/div[1]/div/div[4]/div/div/span/span[3]/select/option[27]"))).click()

WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//*[@id='react-root']/section/main/div/div/div[1]/div/div[6]/button"))).click()
time.sleep(3)

fMail = fake_email[0].split("@")
mailName = fMail[0]
domain = fMail[1]
instCode = verifiCode.getInstVeriCode(mailName, domain, driver)
driver.find_element_by_name('email_confirmation_code').send_keys(instCode, Keys.ENTER)
time.sleep(10)
try:
not_valid = driver.find_element_by_xpath('/html/body/div[1]/section/main/div/div/div[1]/div[2]/form/div/div[4]/div')
if(not_valid.text == 'That code isn't valid. You can request a new one.'):
time.sleep(1)
driver.find_element_by_xpath('/html/body/div[1]/section/main/div/div/div[1]/div[1]/div[2]/div/button').click()
time.sleep(10)
instCodeNew = verifiCode.getInstVeriCodeDouble(mailName, domain, driver, instCode)
confInput = driver.find_element_by_name('email_confirmation_code')
confInput.send_keys(Keys.CONTROL + "a")
confInput.send_keys(Keys.DELETE)
confInput.send_keys(instCodeNew, Keys.ENTER)
except:
pass

@vaasu070
Copy link

run with chrome option like this python .\botAccountCreate.py --chrome

@whitedwarf-irfan
Copy link

Thanks! vaasu070

@yosia-md
Copy link

run with chrome option like this python .\botAccountCreate.py --chrome

i dont understand these>? which one should i change? or run and where?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants