madingess / EasyApplyBot

Automate LinkedIn Easy Apply job applications and answer application-specific questions.
GNU General Public License v3.0
101 stars 113 forks source link

Phone number is being inserted as Last Name #5

Closed ergosumdre closed 1 year ago

ergosumdre commented 1 year ago

Whenever LinkedIn prompts the user for the First Name, Last Name, email, etc, the bot enters my Phone Number in place of my last name.

logix727 commented 1 year ago

im also getting that hmm

madingess commented 1 year ago

Will you please provide the commands and outputs from your terminal when this occurs?

Example:

michael@Mmmmm:~/Documents/Applications/EasyApplyBot/EasyApplyBot$ source venv/bin/activate
(venv) michael@Mmmmm:~/Documents/Applications/EasyApplyBot/EasyApplyBot$ python3 main.py

[WDM] - ====== WebDriver manager ======
[WDM] - Current google-chrome version is 108.0.5359
[WDM] - Get LATEST chromedriver version for 108.0.5359 google-chrome
[WDM] - Driver [/home/michael/.wdm/drivers/chromedriver/linux64/108.0.5359.71/chromedriver] found in cache
Starting the search for php developer in Remote.
Going to job page 0
^[Starting the application process for this page...
Applying to the job....
Done applying to the job!
Already applied to the job!
Applying to the job....
Done applying to the job!
Applying to the job....
ergosumdre commented 1 year ago

Sure thing, but it does not throw any errors while inserting the phone number as my last name. I 'CTRL C'd terminal when it happened.

(venv) dre@dre-server4:~/Downloads/EasyApplyBot$ python3 main.py /home/dre/Downloads/EasyApplyBot/main.py:16: DeprecationWarning: executable_path has been deprecated, please pass in a Service object driver = webdriver.Chrome(ChromeDriverManager().install(), chrome_options=browser_options) /home/dre/Downloads/EasyApplyBot/main.py:16: DeprecationWarning: use options instead of chrome_options driver = webdriver.Chrome(ChromeDriverManager().install(), chrome_options=browser_options) Starting the search for Digital Marketing in Remote. Going to job page 0 Starting the application process for this page... Applying to the job.... Retrying application, attempts left: 2 Retrying application, attempts left: 1 Retrying application, attempts left: 0 NoneType: None Failed to apply to job! Please submit a bug report with this link: https://www.linkedin.com/jobs/view/3369062667/ Writing to the failed csv file... Applying to the job.... Done applying to the job! Applying to the job.... ^C

madingess commented 1 year ago

Retrying application, attempts left: 2 Retrying application, attempts left: 1 Retrying application, attempts left: 0

This output indicates you are using an older version of this bot. Depending on how behind your local branch is, this may or not be fixed in the newest version.

Please retry with the newest version. To update you can use the command:

git pull
ergosumdre commented 1 year ago

Thanks for the reply. I've updated the version, however, it's doing the same thing. I also double-checked the config.yaml to make sure everything is correct.

Here's a screenshot of the Linkedin Form.

Screen Shot 2022-12-18 at 11 44 18 AM
voidbydefault commented 1 year ago

Thanks for the reply. I've updated the version, however, it's doing the same thing. I also double-checked the config.yaml to make sure everything is correct.

Here's a screenshot of the Linkedin Form. Screen Shot 2022-12-18 at 11 44 18 AM

Please check your "additional parameters" section in config.yaml. Probably you may have added or deleted a line or inserted a tab.

madingess commented 1 year ago

I am unable to reproduce this with current BrainTrust job listings.

Redacting PII, will you please post the contents of your config.yaml here? There may be an issue of misconfiguration or unexpected configuration occurring.

voidbydefault commented 1 year ago

I can confirm the issue doesn't exist. Probably it's a formatting issue in user's 'config.yaml'. He is not responsive. Please consider closing the issue for tidiness.

gobiursus commented 1 year ago

I can confirm this issue exist but I am not sure where the bug is.

gobiursus commented 1 year ago

OK, I think I got this issue. This issue appears when filling up "Contact Info" page.

    def contact_info(self):
        frm_el = self.browser.find_elements(By.CLASS_NAME, 'jobs-easy-apply-form-section__grouping')
        if len(frm_el) > 0:
            for el in frm_el:
                text = el.text.lower()
                if 'email address' in text:
                    continue
                elif 'phone number' in text:
                    try:
                        country_code_picker = el.find_element(By.XPATH, '//select[contains(@id,"phoneNumber")][contains(@id,"country")]')
                        self.select_dropdown(country_code_picker, self.personal_info['Phone Country Code'])
                    except Exception as e:
                        print("Country code " + self.personal_info['Phone Country Code'] + " not found! Make sure it is exact.")
                        print(e)
                    try: 
                        phone_number_field = el.find_element(By.XPATH, '//input[contains(@id,"phoneNumber")][contains(@id,"nationalNumber")]') 
                        self.enter_text(phone_number_field, self.personal_info['Mobile Phone Number'])
                    except Exception as e:
                        print("Could not input phone number:")
                        print(e)

The script can input first name right because it recognizes the first column as "email address" so it will just continue, the last name column was recognized as "phone number" because it is the second column so it will input your phone number into it. I want to provide my code to fix this issue but I don't know programming at all. Please fix!

logix727 commented 1 year ago

I got it also

On Thu, Dec 29, 2022, 5:35 PM taimur @.***> wrote:

I can confirm the issue doesn't exist. Probably it's a formatting issue in user's 'config.yaml'. He is not responsive. Please consider closing the issue for tidiness.

— Reply to this email directly, view it on GitHub https://github.com/madingess/EasyApplyBot/issues/5#issuecomment-1367617674, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEPXCRRNLPXJTIWECQHBMTDWPYGZ5ANCNFSM6AAAAAAS2MCSTA . You are receiving this because you commented.Message ID: @.***>

madingess commented 1 year ago

I cannot currently replicate the issue. It would greatly assist me in fixing this if a user experiencing this issue posted their terminal window's commands and outputs and potentially their config.yaml. Please redact any PII.

The script can input first name right because it recognizes the first column as "email address" so it will just continue, the last name column was recognized as "phone number" because it is the second column so it will input your phone number into it.

The bot does not assume anything based on the order of the elements. It looks for keywords in the text of each element to decide how to answer.

I want to provide my code to fix this issue but I don't know programming at all. Please fix!

If you do have code which fixes this issue for you, will you please post it here?

logix727 commented 1 year ago

Yep got you when home

On Fri, Dec 30, 2022, 5:45 PM Michael Dingess @.***> wrote:

I cannot currently replicate the issue. It would greatly assist me in fixing this if a user experiencing this issue posted their terminal window's commands and outputs and potentially their config.yaml. Please redact any PII.

The script can input first name right because it recognizes the first column as "email address" so it will just continue, the last name column was recognized as "phone number" because it is the second column so it will input your phone number into it.

The bot does not assume anything based on the order of the elements. It looks for keywords in the text of each element to decide how to answer.

I want to provide my code to fix this issue but I don't know programming at all. Please fix!

If you do have code which fixes this issue for you, will you please post it here?

— Reply to this email directly, view it on GitHub https://github.com/madingess/EasyApplyBot/issues/5#issuecomment-1368113523, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEPXCRRN7WL63RVSNCWZEJDWP5QZDANCNFSM6AAAAAAS2MCSTA . You are receiving this because you commented.Message ID: @.***>

gobiursus commented 1 year ago

Please redact any PII.

What do you mean by this?

The bot does not assume anything based on the order of the elements. It looks for keywords in the text of each element to decide how to answer.

Yes you are right, I manually applied one job with right last name and modified code to this:

def contact_info(self):
        frm_el = self.browser.find_elements(By.CLASS_NAME, 'jobs-easy-apply-form-section__grouping')
#        if len(frm_el) > 0:
        for el in frm_el:
            text = el.text.lower()
            print(el.text)
            if 'first name' in text:
                continue
            elif 'last name' in text:
                continue
            elif 'email address' in text:
                continue
            elif 'phone number' in text:
                try:

But the script still overwrote my previously saved correct last name with my phone number.

and potentially their config.yaml

I literally deleted the LastName word in original Last Name: LastName word alphabet by alphabet in your config.yaml file to avoid formatting issue.

By the way, the original format of company black list in sample config.yaml IS WRONG. You can't leave things like this, this is not gonna work:

companyBlacklist:
 - company
 - company2

So you have to be like this:

companyBlacklist:
 - "company"
 - "company2"

Thank you

voidbydefault commented 1 year ago

@gobiursus can you start afresh from new config.yaml? Update it manually without copying/pasting inputs while ensuring spaces, tabs, and rows aren't disturbed.

Try git restore config.yaml (take backup of current one first).

I am using the latest repo and the issue isn't occurring. Bot is running, 250+ applications done and counting.

gobiursus commented 1 year ago

@gobiursus can you start afresh from new config.yaml? Update it manually without copying/pasting inputs while ensuring spaces, tabs, and rows aren't disturbed.

Try git restore config.yaml (take backup of current one first).

I am using the latest repo and the issue isn't occurring. Bot is running, 250+ applications done and counting.

Did, not working. I also downloaded a new config.yaml and still not working. I tried to both directly execute main.py and execute in venv, both not working. Can you provide a debugging environment?

gobiursus commented 1 year ago

Update: I find the problem.

madingess commented 1 year ago

I just pushed a fix for this. Can confirm I broke this when fixing another issue.

Thank you for the application link @gobiursus . That was key to finding the problem.

gobiursus commented 1 year ago

Hi, I confirm it solved problem! According to my debugging result shows after the last name correctly inputted, it would fill text for "Phone Country Code" and execute the 431st line and input the phone number into the "last input-able text field" which is the "Last Name field".