Skip to content
Merged
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
1 change: 0 additions & 1 deletion constants/urls.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
CHROMEDRIVER_PATH = './chromedriver'
RESUME_PATH = '/src/resume.png'
7 changes: 5 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
from resume_faker import make_resume
from pdf2image import convert_from_path

from webdriver_manager.chrome import ChromeDriverManager
os.environ['WDM_LOG_LEVEL'] = '0'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should by passed through the constructor instead:

ChromeDriverManager(log_level=0)

https://github.com/SergeyPirogov/webdriver_manager#wdm_log_level


from constants.common import *
from constants.fileNames import *
from constants.classNames import *
Expand All @@ -26,7 +29,7 @@
os.environ["PATH"] += ":/usr/local/bin" # Adds /usr/local/bin to my path which is where my ffmpeg is stored

fake = Faker()
chromedriver_location = CHROMEDRIVER_PATH

# Change default in module for print to flush
# https://stackoverflow.com/questions/230751/how-can-i-flush-the-output-of-the-print-function-unbuffer-python-output#:~:text=Changing%20the%20default%20in%20one%20module%20to%20flush%3DTrue
print = functools.partial(print, flush=True)
Expand Down Expand Up @@ -112,7 +115,7 @@ def solveCaptcha(driver):
driver.switch_to.default_content()

def start_driver(random_city):
driver = webdriver.Chrome(chromedriver_location)
driver = webdriver.Chrome(ChromeDriverManager().install())
driver.get(CITIES_TO_URLS[random_city])
driver.implicitly_wait(10)
time.sleep(2)
Expand Down
23 changes: 12 additions & 11 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
certifi==2021.5.30
charset-normalizer==2.0.4
idna==3.2
requests==2.26.0
selenium==3.141.0
urllib3==1.26.6
Faker==9.9.1
fpdf==1.7.2
pdf2image==1.16.0
SpeechRecognition==3.8.1
pydub==0.25.1
certifi==2021.5.30
charset-normalizer==2.0.4
idna==3.2
requests==2.26.0
selenium==3.141.0
urllib3==1.26.6
Faker==9.9.1
webdriver-manager==3.5.2
fpdf==1.7.2
pdf2image==1.16.0
SpeechRecognition==3.8.1
pydub==0.25.1