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

PDF Resume Upload, Fill out education information, Incognito Mode #48

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

tommmmyb
Copy link

@tommmmyb tommmmyb commented Dec 13, 2021

Functionality Changes:

  • Uploads resumes as pdf instead of png
  • Fills out new education and work experience sections that appear after the site scans the pdf and autofills some info
  • Uses incognito browser (increases the number of times you can use the captcha before it locks you out - not indefinitely, just better)
  • Now fills a lot of the optional dropdown menus with random selections to make the application look more genuine
  • Salary input values are now a range instead of a single value

Small Code Changes:

  • all of the xpaths that are referenced after the resume upload had to be changed. After a pdf is uploaded, all of the HTML element id's are rewritten to a random number. Instead, the script now searches for them by their "name" attribute
  • fixed an error where the zip code was submitting the list of all 6 zip codes as one long string
  • added a check at the end to see if the application has actually been submitted
  • Suppresses some of Selenium's networking output that I don't care about

Next to implement:

  • Need to write down the rest of the dropdown menu selection options and add them to the lists in the "common.py"
  • I've only seen this happen once before, but when the site scans the text in the pdf and autofills certain text fields, it creates an education dropdown and a "work experience" dropdown. I haven't done anything to handle the work experience section. If it comes up, the script fails

Edit: thanks to the amazing resumes generated by @TwoThousandHedgehogs , the work experience section mostly autofills. I've added the last few selection fields so it's all working now

@tommmmyb tommmmyb mentioned this pull request Dec 13, 2021
@tommmmyb tommmmyb mentioned this pull request Dec 13, 2021
main.py Outdated
driver.find_element_by_xpath(DEGREE_COMPLETION_LABEL + '/option[text()="' + random.choice(GRADUATION_STATUS) + '"]').click()
driver.find_element_by_xpath(DEGREE_MAJOR_LABEL + '/option[text()="' + random.choice(DEGREE_MAJORS) + '"]').click()
driver.find_element_by_xpath(DEGREE_TYPE_LABEL + '/option[text()="' + random.choice(DEGREE_TYPES) + '"]').click()
print('successfully filled out degree information')
Copy link

Choose a reason for hiding this comment

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

Any chance you could merge in #51 and have the resume & website agree on university and degree? Otherwise, this looks fantastic.

Copy link
Author

Choose a reason for hiding this comment

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

Merged in the latex_resumes. The university is auto-filled from the resume, so luckily we don't have to touch that. I still need to copy the long list of degree majors from the site's dropdown list.

Because the "major/area of study" field is a dropdown, I need specific strings in order to match the selection (I can't type my own option). To make this easier, once I copy over the list of majors, could you modify the resume generator to only use those major names?

The list of majors will be in "common.py" under the variable name "DEGREE_MAJORS"

Also I can't be sure if its still working after the merge, cause email verification. Hopefully there'll be a fix in a few hours when I have time to work on it.

Copy link

Choose a reason for hiding this comment

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

Absolutely, should be an easy fix. It’ll likely auto-populate once that’s done, won’t it?

Copy link
Author

Choose a reason for hiding this comment

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

I don't believe it's capable of auto-populating dropdown menus. I'm writing a summary of the auto-fill behavior I've noticed and I'll comment it on your PR

Copy link

Choose a reason for hiding this comment

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

what if make_resume() returned the university and degree it chose, so that main.py can use those same values to “manually” fill those dropdowns? or, alternatively (or simultaneously), make_resume() accepted university and job as optional parameters, so that main.py could generate them and pass them along just like it does with name, email, and phone?

I can experiment with both of those with my own commits, if you prefer.

Copy link

Choose a reason for hiding this comment

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

We could store degree names in a dict, like:

DEGREES = [
  { 'dropdown': 'Bachelors Degree (Bachelor of Science or Arts) Aviation', 'resume': 'Bachelor of Science in Aviation' },
  …
]

(or even define a small degree object, if we want to be fancy). That way we wouldn’t have to worry about parsing from one to the other.

Copy link

Choose a reason for hiding this comment

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

I like the idea of storing everything in fake_identity for sure.

Copy link
Author

Choose a reason for hiding this comment

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

Ok as I'm looking through resume_faker.py , I think we're overcomplicating things. Everything currently in that file is a Bachelor's Degree of some sort, so they all correspond to "Bachelors Degree (Bachelor of Science or Arts)". Simple as that

We could add in a bunch of associates degrees as a separate list if we want to mix up the results, then they would all correspond to "Associates Degree/Diploma" in the form. I think these degrees are most in line with what Kelloggs would actually be looking for, and they're extremely common degrees, so we could just keep it at that.

Thinking about adding "High School Diploma" as well, but I'm realizing that if there isn't a college listed on the resume, the form won't autofill the college. Maybe we can experiment with putting high school names in the resume and seeing if the form still auto-fills the education section

Copy link

Choose a reason for hiding this comment

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

Seems like you’re right about us overcomplicating it. We could add associate’s degrees, but i’m not so sure we should be worrying about a recruiter being able to manually tell the difference between a fake resume and a real one (the bullet points are all gibberish anyway), so i don’t think the specific degree matters much (in my opinion).

Copy link
Author

Choose a reason for hiding this comment

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

Yeah let's just keep it to Bachelors Degrees only (which is how it already is) and a random major. So I just need to add in the rest of the majors and this will all be dealt with

@ghost ghost linked an issue Dec 13, 2021 that may be closed by this pull request
README.md Outdated Show resolved Hide resolved
requirements.txt Outdated Show resolved Hide resolved
@ghost
Copy link

ghost commented Dec 13, 2021

(I’d be working on this now rather than just talking about it, but i’m waiting for email stuff to be finished up so I can test as I write)

@ghost
Copy link

ghost commented Dec 14, 2021

Email fix has been merged to main!

@ghost
Copy link

ghost commented Dec 14, 2021

Resolved conflicts.

@ghost
Copy link

ghost commented Dec 14, 2021

I've been working on getting the bot to fill in the education and employment fields, but I realized we could also just...click "Remove" on all of them and not worry about it. What are your thoughts there? It would really simplify things.

@tommmmyb
Copy link
Author

I noticed that too but decided it might make them more difficult to filter if they couldn't just filter out any application with no education or work history.

In fact they might already do that. Idk what kelloggs wants for employees but some sort of work or school background is probably expected.

I have a local copy that's almost working, but I'm having trouble getting the subprocess.call(['pdflatex' ... function to find the executable in my environment path on windows. I can only get it to work with an absolute path to the executable, even though it's in my PATH

@ghost
Copy link

ghost commented Dec 14, 2021

Some quick googling, maybe this could help?

https://stackoverflow.com/questions/3022013/windows-cant-find-the-file-on-subprocess-call

@tommmmyb
Copy link
Author

tommmmyb commented Dec 16, 2021

@TwoThousandHedgehogs give this a try. I figured out the issue for windows and tried to use the os module for all the path naming to make it cross-platform. I'm travelling rn and don't have my mac so I need someone to test it out with a UNIX system

@ghost
Copy link

ghost commented Dec 16, 2021

No crashes, but I'm still getting fairly frequent failures with some fields not being filled in, often dates in Education and Work Experience. Maybe the new templates are part of the cause? Or maybe it just needs some time.sleep()s so it can find all the fields after they load.

@tommmmyb
Copy link
Author

It's probably the name of the school not auto filling. I've got a fix for that along with some error handling for the optional fields. I'm getting close to no failures at all. I'll push fixes soon

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

Successfully merging this pull request may close these issues.

Salary numbers?
2 participants