Automate Your Job Hunt: Step Up Your LinkedIn Game

Automatically apply for jobs on LinkedIn (Python + Selenium): Login and Job Search

Estimated read time: 1:20

    Learn to use AI like a Pro

    Get the latest AI workflows to boost your productivity and business performance, delivered weekly by expert consultants. Enjoy step-by-step guides, weekly Q&A sessions, and full access to our AI workflow archive.

    Canva Logo
    Claude AI Logo
    Google Gemini Logo
    HeyGen Logo
    Hugging Face Logo
    Microsoft Logo
    OpenAI Logo
    Zapier Logo
    Canva Logo
    Claude AI Logo
    Google Gemini Logo
    HeyGen Logo
    Hugging Face Logo
    Microsoft Logo
    OpenAI Logo
    Zapier Logo

    Summary

    In this engaging tutorial by AI Coding, viewers are guided through the process of automating the job application process on LinkedIn using Python and Selenium. The video builds on a previous installment, focusing on how to log into LinkedIn and search for jobs by creating two separate functions. The tutorial explains how to use web development tools in Chrome to locate and interact with web elements, such as login inputs and search fields, and emphasizes the importance of timing when dealing with page loads. By the end of the video, users will have a working script that logs into LinkedIn, navigates to the jobs section, and searches for positions based on specified keywords and locations.

      Highlights

      • Master LinkedIn job applications with Python and Selenium in just a few steps! ๐Ÿ’ช๐Ÿ“ˆ
      • Develop a function to log in to LinkedIn automatically using Selenium. ๐Ÿค–๐Ÿ”
      • Search for jobs with specific keywords and locations effortlessly. ๐ŸŒโš™๏ธ
      • Use developer tools to identify elements like login inputs and search fields. ๐Ÿ†”๐Ÿ”
      • Incorporate time delays to ensure web elements load properly before action. ๐Ÿ•ฐ๏ธโœ…

      Key Takeaways

      • Learn to automate your LinkedIn job search with Python and Selenium! ๐Ÿ๐Ÿ’ป
      • Break down your task into two main functions: login and job search. ๐Ÿ”‘๐Ÿ—‚๏ธ
      • Utilize Chrome's developer tools to identify web elements efficiently. ๐Ÿ› ๏ธ๐Ÿ”
      • Time management is crucial when waiting for pages to load and elements to appear. โณโŒ›
      • Take this skill to the next level by modifying the script to suit your custom job search needs. ๐Ÿš€๐ŸŽฏ

      Overview

      This tutorial by AI Coding is a must-watch for those looking to expedite their LinkedIn job application process through automation. By harnessing the power of Python and Selenium, anyone can create scripts that handle repetitive tasks, making job hunting more efficient.

        In the video, the creator takes you through setting up your Python environment, downloading WebDriver, and using Chromeโ€™s developer tools to manipulate LinkedInโ€™s web components. Through clear and concise steps, it becomes easier to access different website elements and interact with them programmatically.

          What sets this tutorial apart is its focus on real-world applicationโ€”showcasing how to program Selenium to navigate LinkedIn, log in, and perform job searches with specific criteria. By addressing potential errors, like ensuring pages have sufficient load time, this guide not only teaches you how to automate the login and search functions but also equips you with skills to customize these for your job search needs.

            Chapters

            • 00:00 - 00:30: Introduction and Video Overview The chapter introduces the second video in a series of tutorials about automatically applying for jobs on LinkedIn. It recaps the previous video, which covered setting up the project and downloading the web driver. This chapter outlines the focus of the current video, which is to demonstrate how to create two functions: one for logging into LinkedIn and another function not specified in the transcript.
            • 00:30 - 02:00: Web Development Tools and Selenium Introduction The chapter introduces the concept of web development tools and provides a brief explanation for those unfamiliar with them.
            • 02:00 - 03:30: Identifying Components on LinkedIn for Selenium The chapter introduces the use of developer tools, accessible via pressing F12, which is essential for web developers to test and examine website components. It specifically refers to identifying these components on LinkedIn, even when not logged in, as a part of using Selenium for automation purposes.
            • 03:30 - 09:30: Creating the Login Function The chapter titled 'Creating the Login Function' discusses the process of identifying and selecting components on a webpage using development tools. By clicking on elements such as the email or phone number input fields, users can locate the corresponding components in the website's structure. Each component can be identified by its class or ID, which facilitates the creation and customization of the login function on the web page.
            • 09:30 - 18:00: Creating the Job Search Function In the chapter titled 'Creating the Job Search Function,' the discussion focuses on how to utilize Selenium for automating interactions with website components. The key point is identifying components of a webpage using attributes like ID, name, or placeholder. For instance, to automate entering an email, one would instruct Selenium to search for and interact with the corresponding webpage element using these attributes. The chapter emphasizes choosing the most convenient attribute identifier for successful automation.
            • 18:00 - 23:00: Handling Errors and Final Testing The chapter covers the practical application of creating and handling errors during the final stages of testing software. It begins with an initial setup where unnecessary files or windows are closed to focus on the task at hand. The chapter introduces the creation of the first function named 'log in link,' emphasizing its automated nature. The details of how this function works or integrates into the system are not fully provided in the transcript.
            • 23:00 - 23:30: Conclusion and Next Steps This chapter focuses on the final steps and considerations for automating the process of logging into a LinkedIn profile using a driver in Python. It emphasizes the importance of ensuring the driver is directed correctly to the login page, following best practices for automation scripts, and considering security implications. The chapter aims to consolidate learnings from previous sections and provides guidance on potential future improvements and real-world applications of the automation process discussed in the book.

            Automatically apply for jobs on LinkedIn (Python + Selenium): Login and Job Search Transcription

            • 00:00 - 00:30 hello everyone welcome to my second video on this series of video tutorials on how to automatically apply for jobs on LinkedIn in the previous video i showcase how to set up your project how to download the web driver to make this project work and today i would just quickly showcase how to make two different functions we're gonna have one function to login into link and a second
            • 00:30 - 01:00 function to make the job search so let's go to it okay so the first thing i want to show you is how to use the web development tools and if you know if you don't know what that is i'm just gonna quickly explain to you let's say you have your google chrome open if you go to the help tab you can see something
            • 01:00 - 01:30 called more tools and something called developer tools which i believe you can just press f12 and you're gonna have them popped up and this is basically what allows web developers to test in the button code so you can see the different components that a website has so if we go to link it in for example and we're not logged in yet we can find
            • 01:30 - 02:00 components by simply selecting an element from the page if we click in this bottom over here and we could find it in this part of the development tools so for example where you're supposed to be inputting your email or phone number we can see that it corresponds to this component in the website and each component has a class it has an ID or
            • 02:00 - 02:30 name and this is basically what selenium uses to identify each of the components of website so if we want to introduce your email and make it use automatically will basically look for that component and the move search it either by ID or name or placeholder whatever we feel more convenient so I'm just gonna show you
            • 02:30 - 03:00 quickly how this work in practice so if we go to our let's just close this from that has been used actually automated and we're just gonna create our first function and we're gonna call it log in link it in this is gonna be you can say
            • 03:00 - 03:30 that this function logs in to your personal link it in profile and be close it okay so what do we want to do so the first thing that we want to do obviously is to make the driver go to the link and
            • 03:30 - 04:00 website right so make driver go to the link it in log in you kidding login URL we can open again on Chrome and you can just say it stopped here we can just say
            • 04:00 - 04:30 [Music] okay we can easily come here or I'm sure we can just login and we can just copy this URL that we're gonna be using so we're just quickly gonna say okay driver I want you to go which is using the
            • 04:30 - 05:00 driver that get function to these Europe oh we can quickly test that if you want to see how the program works it would open up and it will not do anything because they didn't told it to do anything let's just say but that login
            • 05:00 - 05:30 linking it remember to tell the program to do what you want it to do okay so you can see that it popped up and it went to this login page okay so I'll just quickly make it bigger my screen so you can see when it pops up we can just do that again and it pops up and it goes -
            • 05:30 - 06:00 Lickety com super so let's continue what's the next step okay so the next step that we want to do is to actually introduce introduce our email and password and hit enter because we want to login
            • 06:00 - 06:30 okay so this is where it comes to web developers tool into practice so if we go back to Google Chrome more tools developer tools and we go to link it in [Music] to that website login we're gonna find by element as I was saying before so the first thing we have to do is to find this element so how is this element call
            • 06:30 - 07:00 so as we see the element ID is user name and the name of the element is session key okay so we're just gonna use that we're gonna tell our web driver we're gonna call this option login email driver we wanted to find element and as
            • 07:00 - 07:30 you can see there's a lot of different types that you can find so you can find element by its class by its CSS selector by ID by name by XPath we're gonna use here the fine element by name it should be a unique name the same as the ID so that will make it easier for
            • 07:30 - 08:00 us to find the element itself so the name of the element is session key so we're just gonna find it by name session key and the next thing that we have to do sorry for my typos the next thing that we have to do is to clear up and
            • 08:00 - 08:30 why do we do this we do this because we need to clean the text field in a neighborhood so it's a way to basically tell the mouse or the automated process we are going to introduce something here and what we want to introduce is we want to use an action called send keys from
            • 08:30 - 09:00 the driver and it's basically we're just gonna send whatever we have chosen as email we're just gonna use our email to send it so this Sankey's is just basically going to type our email where it corresponds and we're just gonna use the same structure to use the password
            • 09:00 - 09:30 so we're gonna do a login password self driver find element by name and in this case the name of the password element if we look it up it's session password so we're gonna do a final name session password we clear it so we can enable
            • 09:30 - 10:00 that password and then we send our password and what's the next step that we need to do once we introduce our email once we introduce our password we just need to pass our there's a type of thing we just need to send our enter we need to enter so it
            • 10:00 - 10:30 will enter into the website and for that we have to import a library called from sitting what drivers common that keys import keys so this is basically a representation of the keys so the key that we want to use for this is the key of a trunk because it would basically make the action of
            • 10:30 - 11:00 sending an Enter key for a return key so we can say keys Todd right right okay so if we put this in practice we're gonna see that the program will introduce our in well first it will go into the link it in website to log in second we'll be
            • 11:00 - 11:30 introducing our email it will introduce our password and it will hit enter going to link it in password and email and hit enter okay so I made a typo just here it's okay so let's just hit it again so I will go to link and put our
            • 11:30 - 12:00 email password and hit enter super okay so after we logged in with our program the next step that we want to do is look for a job you can create any algorithm that you want you can basically search directly here you could go to my network and then find people
            • 12:00 - 12:30 that works for specific companies my approach it's an algorithm that goes to the jobs section finds this two boxes here so one for keyboard keywords and one for the location that's why we use that in our configuration file and then it sorts the jobs so we're going to be
            • 12:30 - 13:00 doing something like in learning engineer we're gonna say in Denmark or whatever and then we're gonna get to this page with our program that's what our function is going to be used in doing so for that we go again into our developer tools so we can see what type of elements we need so we're gonna start
            • 13:00 - 13:30 for our function we're gonna call it job search we're just gonna say that this function [Music] goes to the jobs section and looks for all the jobs that matches the keywords
            • 13:30 - 14:00 and location okay so what's the first thing that we need to do we need to go to the jobs section okay so if we go again and look for the element we want
            • 14:00 - 14:30 to basically touch on this link right here and there's a very good tool with selenium that you can basically find an element by the text that is included in the link so in this case the text that is included in the link it's jobs so let's just gonna try that and see if it
            • 14:30 - 15:00 works just call jobs link 5-element link text and we can say jobs and automatically after it finds that we
            • 15:00 - 15:30 wanted to click it so we just say jobs link click ok so for the second part of this function we want to after clicking on the length of the jobs we need to specify which job we're looking for and which location we're gonna be looking that position and so for this part we cannot follow a similar approach as the
            • 15:30 - 16:00 previous function when we logged in unlink it it and we're gonna find out what are the text box in those two fields so we can enter our keyword in our location in the same matter as the previous function so if we go to Lincoln in just quickly again and we come to
            • 16:00 - 16:30 jobs we see that these are the text box that we are interested in so let's just quickly check in our developers tools what are those text box ok so the first one is an input this is very important that you find out the element that is clickable for the text box if you find an element that you cannot click in you
            • 16:30 - 17:00 will not be able to input text and make sure that the type that you're clicking it's a text we're gonna see in the next section how we can oppress bottoms and not only use the return key to enter text in this text box okay so what we're gonna do is that in this case instead of using the fine
            • 17:00 - 17:30 element by name from our web driver we're gonna use something called fine element by XPath and what does this mean is a syntax or language for find an element on the webpage using xml path expression so we're gonna have basically a tag name which in this case would be input we're gonna have a attribute that in
            • 17:30 - 18:00 this case is going to be the ID and we're gonna have a value for the attribute and for the value we're just gonna tell our program to search for an ID that starts with job search box keyword and we're going to do the same for the location we're just gonna tell the program to find an ID that starts with job search box location so let's see how we would do this in the code so
            • 18:00 - 18:30 we're going to do similar approaches before so in introduce our keyword location and hit enter let's call this search keyword self driver that find element by expo and we're going to say
            • 18:30 - 19:00 input starts with ID and the ID was jobs search dogs keyword
            • 19:00 - 19:30 and the next part that we're gonna do is the same we're gonna clear up that box so we could enable it clear and we will send our keyword keys so that keywords and we're just going to do the same for
            • 19:30 - 20:00 the location so I'm just basically going to copy this and just quickly change key word for location okay location and here we're just gonna
            • 20:00 - 20:30 put location okay so let's just try this out and see what happens
            • 20:30 - 21:00 okay so we login we click in the jobs okay so we're gonna have an error here and this is basically saying that it's not fine in the element for one reason it takes time to load the webpage so you should give some time to the testing to realize that the elements are being loaded properly and with this I like to
            • 21:00 - 21:30 use a function from Python that is called time so what I do here is I am for time and I just put some time in between the steps so let's put it five and let's give it some let's just give it some time in between finding the
            • 21:30 - 22:00 elements as well here and maybe here too the number corresponds of the numbers of seconds that you're letting the program sleep for a while and wait until you can proceed for the next action so now we have to include the hit enter so we're just gonna say search location dots and
            • 22:00 - 22:30 keys so keys dot return okay so let's try that out and see if it works super so now we are into our page with
            • 22:30 - 23:00 our desired job offer and our desired location and that's about it for this tutorial so in the next section I will introduce how to filter a bit more this job offers and how to apply for each of the offers or how to select them how to find them how to select them and what we
            • 23:00 - 23:30 have to do for for applying for the job positions so I hope you like this tutorial I hope you find it useful subscribe if you liked it and just a reminder you have all the links in the description thank you