Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,20 @@ On mac/pc:

`pip install -r requirements.txt`

This will install `webdriver-manager` to automatically download the correct chrome driver. If you are having issues opening having it open chrome, check https://github.com/SergeyPirogov/webdriver_manager.
This will install `webdriver-manager` to automatically download the correct chrome driver.
If you are having issues opening having it open chrome, check https://github.com/SergeyPirogov/webdriver_manager.

Poppler must be installed for pdf2image. Follow the instructions at https://pdf2image.readthedocs.io/en/latest/installation.html to install.

You will also need to install ffmpeg if it is not already installed: [Mac installation guide](https://superuser.com/a/624562) [Windows installation guide](https://www.wikihow.com/Install-FFmpeg-on-Windows)
`pdflatex` must also be available. If you're unsure where to start with that, follow the [official instructions](https://www.latex-project.org/get/).
(Mac users: I'd recommend using [Homebrew](https://brew.sh/) to install [BasicTex](https://formulae.brew.sh/cask/basictex#default).).
(On linux you'll have to install the `texlive-latex-base` package on whatever package manager you use.).

LaTeX must also be installed for resume generation. If you're unsure where to start with that, follow the [official instructions](https://www.latex-project.org/get/). (Mac users: I'd recommend using [Homebrew](https://brew.sh/) to install [BasicTex](https://formulae.brew.sh/cask/basictex#default).)
If you get a `FileNotFoundError: [WinError 2] The system cannot find the file specified`,
chances are you're missing some fonts. Running
`tlmgr install collection-fontsextra` and
`tlmgr install collection-fontsrecommended`
in the terminal/command line should fix this.

`python main.py` to run. It will loop until you kill the job. `ctrl + c` in your terminal to give HR a break (optional).

Expand Down
2 changes: 0 additions & 2 deletions constants/classNames.py

This file was deleted.

5 changes: 1 addition & 4 deletions constants/elementIds.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,4 @@
RELATIVE_WORKER_LABEL = '227:_select'
ESSENTIAL_FUNCTIONS_LABEL = '231:_select'
GENDER_LABEL = '235:_select'
RECAPTCHA_AUDIO_BUTTON = 'recaptcha-audio-button'
RECAPTCHA_ANCHOR = 'recaptcha-anchor'
AUDIO_SOURCE = 'audio-source'
AUDIO_RESPONSE = 'audio-response'

2 changes: 0 additions & 2 deletions constants/fileNames.py

This file was deleted.

52 changes: 28 additions & 24 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
os.environ['WDM_LOG_LEVEL'] = '0'

from constants.common import *
from constants.fileNames import *
from constants.classNames import *
from constants.elementIds import *
from constants.email import *
from constants.location import *
Expand All @@ -32,8 +30,6 @@
from constants.xPaths import *
from constants.areaCodes import *

os.environ["PATH"] += ":/usr/local/bin" # Adds /usr/local/bin to my path which is where my ffmpeg is stored

fake = Faker()

# Add printf: print with flush by default. This is for python 2 support.
Expand Down Expand Up @@ -230,20 +226,12 @@ def random_phone(format=None):
elif format==4:
return '('+area_code+') '+middle_three+'-'+last_four

def main():
while True:
random_city = random.choice(list(CITIES_TO_URLS.keys()))
try:
driver = start_driver(random_city)
except Exception as e:
printf(f"FAILED TO START DRIVER: {e}")
pass

time.sleep(2)
def random_identity():
fake_first_name = fake.first_name()
fake_last_name = fake.last_name()
fake_phone = random_phone()

fake_first_name = fake.first_name()
fake_last_name = fake.last_name()
fake_phone = random_phone()
try:
if (args.mailtm == MAILTM_DISABLED):
printf(f"USING GUERRILLA TO CREATE EMAIL")
response = requests.get('https://api.guerrillamail.com/ajax.php?f=get_email_address').json()
Expand All @@ -257,14 +245,30 @@ def main():
fake_email = requests.post('https://api.mail.tm/accounts', data='{"address":"'+random_email(fake_first_name+' '+fake_last_name)+'","password":" "}', headers={'Content-Type': 'application/json'}).json().get('address')
mail_sid = requests.post('https://api.mail.tm/token', data='{"address":"'+fake_email+'","password":" "}', headers={'Content-Type': 'application/json'}).json().get('token')
printf(f"EMAIL CREATED")
except:
args.mailtm ^= True
return random_identity()

return {
'first_name': fake_first_name,
'last_name': fake_last_name,
'email': fake_email,
'phone': fake_phone,
'sid' : mail_sid
}

def main():
while True:
random_city = random.choice(list(CITIES_TO_URLS.keys()))
try:
driver = start_driver(random_city)
except Exception as e:
printf(f"FAILED TO START DRIVER: {e}")
pass

time.sleep(2)

fake_identity = {
'first_name': fake_first_name,
'last_name': fake_last_name,
'email': fake_email,
'phone': fake_phone,
'sid' : mail_sid
}
fake_identity = random_identity()

try:
generate_account(driver, fake_identity)
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ urllib3==1.26.6
Faker==9.9.1
webdriver-manager==3.5.2
pdf2image==1.16.0
SpeechRecognition==3.8.1
pydub==0.25.1