forked from wodsuz/EasyApplyJobsBot
-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathconstants.py
More file actions
executable file
·136 lines (96 loc) · 4.57 KB
/
constants.py
File metadata and controls
executable file
·136 lines (96 loc) · 4.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
websiteUrl = "www.automated-bots.com"
contactUrl = "https://www.automated-bots.com/contact"
searchJobsUrl = "https://www.linkedin.com/jobs/search/"
searchEasyApplyJobsUrl = "https://www.linkedin.com/jobs/search/?f_AL=true"
angelCoUrl = "https://angel.co/login"
globalLogicUrl = "https://www.globallogic.com/career-search-page/"
jobsPerPage = 25
fast = 2
medium = 3
slow = 5
botSleepInBetweenActionsBottom = 4
botSleepInBetweenActionsTop = 12
botSleepInBetweenBatchesBottom = 10
botSleepInBetweenBatchesTop = 70
batchSize = 10
botSleepInBetweenSearchesBottom = 60
botSleepInBetweenSearchesTop = 180
numberOfDefaultPagesInApplication = 2
# Webdriver Elements
jobsPageUrl = "https://www.linkedin.com/jobs"
testJobUrl = "https://www.linkedin.com/jobs/search/?currentJobId=3577461385&distance=25&f_AL=true&f_E=2&f_JT=F%2CP%2CC&f_SB2=3&f_WT=1%2C2%2C3&geoId=102221843&keywords=frontend"
testPageUrl = testJobUrl +"&start="+ str(2)
# Class Name Selectors
resumeNameElementClassName = "jobs-document-upload-redesign-card__file-name"
# CSS Selectors
buttonDismissCSS = "button[aria-label='Dismiss']"
buttonDocumentUploadCSS = "label.jobs-document-upload__upload-button"
buttonEasyApplyCSS = "button[aria-label*='Easy Apply']"
buttonNextPageCSS = "button[aria-label='Continue to next step']"
buttonReviewApplicationCSS = "button[aria-label*='Review']"
buttonShowMoreDocumentsCSS = "button[aria-label='Show more resumes']"
buttonSubmitApplicationCSS = "button[aria-label='Submit application']"
divWithResumeCSS = ".jobs-document-upload-redesign-card__container"
divWithQuestionsCSS = "div.pb4"
divWithQuestionGroupsCSS = "div.jobs-easy-apply-form-section__grouping"
dialogApplicationSubmittedCSS = "div[data-test-modal][role='dialog']"
errorMessageForNecessaryFiledCSS = "div.artdeco-inline-feedback.artdeco-inline-feedback--error[data-test-form-element-error-messages]"
headerJobTitleCSS = "h1.t-24.t-bold.inline"
followCheckboxCSS = "label[for='follow-company-checkbox']"
inputRadioCSS = "input[type='radio']"
inputSingleLineTextCSS = "input.artdeco-text-input--input"
inputTextAreaCSS = "textarea"
jobCardCompanyNameCSS = "div.artdeco-entity-lockup__subtitle span"
jobCardContainerCSS = "li[data-occludable-job-id]"
jobCardDescriptionCSS = "ul.job-card-container__metadata-wrapper"
jobCardIdAttribute = "data-occludable-job-id"
jobCardTitleLinkCSS = "a.job-card-list__title--link"
# TODO Try adding other selectors to increase the number of job titles found
# jobCardTitleLinkCSS = "a[class*='job-card-list__title']"
# jobCardTitleHeadingCSS = "h3[class*='job-card-list__title']"
# jobCardBaseTitleCSS = "[class*='base-card__title']"
# jobCardTitleLabelCSS = "[aria-label*='job title']"
labelQuestionCSS = "label.artdeco-text-input--label"
profilePhotoCSS = "img.global-nav__me-photo.evi-image.ember-view"
spanCSS = "span"
# ID Selectors
jobDetailsID = "job-details"
passwordID = "password"
usernameID = "username"
# Xpath Selectors
appliedTextXPATH = ".//*[contains(text(), 'Applied')]"
buttonSubmitLoginXPATH = '//button[@type="submit"]'
divWithJobCompanyXPATH = "//div[contains(@class, 'job-details-jobs-unified-top-card__company-name')]//a"
divWithJobPagePrimaryDescriptionXPATH = "//div[contains(@class, 'job-details-jobs-unified-top-card__primary-description-container')]//div"
jobApplicationHeaderXPATH = "//h2[@id='jobs-apply-header']"
jobLocationXPATH = ".//span[contains(@class, 'tvm__text--low-emphasis')][1]"
jobWorkplaceTypeXPATH = "//li[contains(@class, 'job-details-jobs-unified-top-card__job-insight')]/span/span"
labelRadioXPATH = "./following-sibling::label"
numberOfApplicantsSpanXPATH = ".//span[contains(@class, 'tvm__text--low-emphasis')]"
multiplePagePercentageXPATH = """//progress[contains(@class, 'artdeco-completeness-meter-linear__progress-element')]"""
offersPerPageXPATH = "//li[@data-occludable-job-id]"
totalJobsXPATH = "//small"
# TODO Add other print constants
# Linkedin Constants
## Job Title Constants
job_title_codes = {
'Android Developer': "25166",
'Mobile Engineer': "7110",
'Mobile Application Developer': "18930",
'Scrum Master': "7586",
'Chief Technology Officer': "153",
'Director of Technology': "382",
'Head of Information Technology': "688",
'Technical Director': "200",
'Co-Founder': "103",
'Data Analyst': "340",
'Business Data Analyst': "6358",
'Business Intelligence Consultant': "733",
'Business Intelligence Analyst': "2336",
'Data Specialist': "1547",
'Data Scientist': "25190",
'Data Engineer': "2732",
'Machine Learning Engineer': "25206",
'Artificial Intelligence Engineer': "30128",
'Python Developer': "25169",
}