nicolomantini / LinkedIn-Easy-Apply-Bot

Automate the application process on LinkedIn
Apache License 2.0
765 stars 321 forks source link

Syntax Error in easyapplybot.py #107

Closed aaronhouillon closed 1 year ago

aaronhouillon commented 1 year ago

Getting this error trying to run the script:

line 206
    self.browser, jobs_per_page: int = self.next_jobs_page(position,
    ^^^^^^^^^^^^
SyntaxError: only single target (not tuple) can be annotated
21jujubees commented 1 year ago

I'm also getting this error, figured it had something to do with what version of Python I was running, so I tried the latest version and still got this error.

samilAyoub commented 1 year ago

me too

samilAyoub commented 1 year ago

what python version you are using?

21jujubees commented 1 year ago

Using 3.10.7

MaxFritzhand commented 1 year ago

Here is the fix: OLD: line 206 self.browser, jobs_per_page: int = self.next_jobs_page(position,

NEW: line 206 self.browser, jobs_per_page = self.next_jobs_page(position,

I believe their is also another reference of this, so remove that as well and this issue should be resolved

samilAyoub commented 1 year ago

I think It would be better if we could know which python version is used

MaxFritzhand commented 1 year ago

I was using python3

MaxFritzhand commented 1 year ago

3.7.8

aaronhouillon commented 1 year ago

I'm using Python 3.10.6

21jujubees commented 1 year ago

Here is the fix: OLD: line 206 self.browser, jobs_per_page: int = self.next_jobs_page(position,

NEW: line 206 self.browser, jobs_per_page = self.next_jobs_page(position,

I believe their is also another reference of this, so remove that as well and this issue should be resolved

This worked for me, thank you! I also had to change line 70.

OLD: def get_appliedIDs(self, filename) -> list | None:

NEW: def get_appliedIDs(self, filename) -> list:

aaronhouillon commented 1 year ago

I've implemented these fixes, and the code will run, but now it's not applying to any jobs :( it just keeps sleeping and waiting while the LinkedIn jobs are pulled up on the screen.

21jujubees commented 1 year ago

I've implemented these fixes, and the code will run, but now it's not applying to any jobs :( it just keeps sleeping and waiting while the LinkedIn jobs are pulled up on the screen.

Yeah the same thing happens to me but at least I get to see it boot up, kinda lost as to where to go from here lol

MaxFritzhand commented 1 year ago

I can send you my revised version of the code snippet if that helps? How can I share it with you guys?

octoshrimpy commented 1 year ago

@MaxFritzhand just make a PR here with your changes, so we can see your fork. :smile:

MaxFritzhand commented 1 year ago

Have a look at my branch! Just added @octoshrimpy @21jujubees let me know if this helps. Just use this easyapplybot.py file and it should be good to go.

jacobbaehr commented 1 year ago

@MaxFritzhand Awesome job! If I want to specify jobs posted in the last 24 hours, do you know what changes I would have to make in your fork?

jacobbaehr commented 1 year ago

@MaxFritzhand Awesome job! If I want to specify jobs posted in the last 24 hours, do you know what changes I would have to make in your fork?

I figured it out if anyone wants to know. Just change the url on line 406 to "https://www.linkedin.com/jobs/search/?f_LF=f_AL&f_TPR=r86400&keywords=" and it will specify jobs posted in the last 24 hours

ZaneBaylon commented 1 year ago

@MaxFritzhand Awesome job! If I want to specify jobs posted in the last 24 hours, do you know what changes I would have to make in your fork?

I'm not farmiliar with Jacob's fork but in the original version that's specified in the csv management section on line 79

        df = df[df['timestamp'] > (datetime.now() - timedelta(days=2))]

Changing 'days=(# of days you want)' should work, and this will allow you to specify any number of days

ZaneBaylon commented 1 year ago

I've implemented these fixes, and the code will run, but now it's not applying to any jobs :( it just keeps sleeping and waiting while the LinkedIn jobs are pulled up on the screen.

I had the same issue as well. LinkedIn has been changing the HTML lately and that's why your code cannot find the element. Change line 186 to:

                  './/a[@data-control-id]'

There may be some lingering issues finding the jobIDs, but this at least should allow your code to apply. Hope this helps!

github-actions[bot] commented 1 year ago

Stale issue message