{"id":29564166,"url":"https://github.com/inquilabee/LinkedinPy","last_synced_at":"2025-07-18T19:08:00.543Z","repository":{"id":57467511,"uuid":"379002584","full_name":"inquilabee/LinkedinPy","owner":"inquilabee","description":"Automate your LinkedIn workflow using Python.","archived":false,"fork":false,"pushed_at":"2023-10-11T15:52:40.000Z","size":452,"stargazers_count":18,"open_issues_count":1,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-25T21:24:35.497Z","etag":null,"topics":["automation","browser-authentication","linkedin","linkedin-automation","linkedin-scraper","python-linkedin","selenium-python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/autolinkedin/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/inquilabee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-21T16:55:28.000Z","updated_at":"2025-06-17T19:34:15.000Z","dependencies_parsed_at":"2023-10-11T20:47:39.864Z","dependency_job_id":null,"html_url":"https://github.com/inquilabee/LinkedinPy","commit_stats":null,"previous_names":["theconfused/linkedin","inquilabee/linkedin"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/inquilabee/LinkedinPy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inquilabee%2FLinkedinPy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inquilabee%2FLinkedinPy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inquilabee%2FLinkedinPy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inquilabee%2FLinkedinPy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inquilabee","download_url":"https://codeload.github.com/inquilabee/LinkedinPy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inquilabee%2FLinkedinPy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265816279,"owners_count":23833112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","browser-authentication","linkedin","linkedin-automation","linkedin-scraper","python-linkedin","selenium-python"],"created_at":"2025-07-18T19:07:59.590Z","updated_at":"2025-07-18T19:08:00.528Z","avatar_url":"https://github.com/inquilabee.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AutoLinkedIn\n\nElevate your LinkedIn game with **AutoLinkedIn**, a Python package designed for automating routine LinkedIn tasks. Whether you want to connect with specific users, manage connection requests, or optimize your LinkedIn networking, this package has you covered.\n\n### Key Features\n\n- **Login to LinkedIn**: Seamlessly access your LinkedIn account.\n- **Send Connection Requests**: Customize your connection requests by filtering users based on mutual connections, user types, and more.\n- **Accept Connection Requests**: Simplify the process of accepting incoming connection requests.\n- **Delete/Withdraw Sent Requests**: Keep your connection list clean by removing outdated sent requests.\n- **Smart Follow-Unfollow**: Automatically manage connections, delete aged requests, and maximize your daily interactions within LinkedIn's limits.\n- **Background Mode**: Run all tasks in the background mode without interfering with your regular work.\n- **Search**: Search for people.\n\n\n### Getting Started\n\nTo get started with **AutoLinkedIn**, first, install the package from PyPi using the following command:\n\n```bash\npip install autolinkedin\n```\n\nNext, you can run and test the package by creating a script similar to `autolinkedin/scripts/sample_script.py`. Start by running your script with `headless=False` to ensure everything works as expected. Once you're confident, switch to `headless=True` to run your script in the background.\n\nHere's a simplified example of running **AutoLinkedIn**:\n\n```python\nfrom autolinkedin.linkedin import LinkedIn\n\n\nwith LinkedIn(\n        username=\"\u003cusername/email\u003e\",\n        password=\"\u003cpas$word\u003e\",\n        browser=\"\u003cChrome/Firefox\u003e\",\n        headless=\"\u003cTrue/False\u003e\",\n) as ln:\n    # Perform LinkedIn actions here\n    ln.withdraw_sent_invitations(older_than_days=14)\n    last_week_invitations = ln.count_invitations_sent_last_week()\n\n    ln.send_invitations(\n        max_invitations=max(ln.WEEKLY_MAX_INVITATION - last_week_invitations, 0),\n        min_mutual=10,\n        max_mutual=450,\n        preferred_users=[\"Quant\", \"Software\"],  # file_path or list of features\n        not_preferred_users=[\"Sportsman\", \"Doctor\"],  # file_path or list of features\n        view_profile=True,  # (recommended) view profile of users you sent connection requests to\n    )\n\n    ln.accept_invitations()\n\n    # Customize your actions as needed\n    # ...\n\n    # Alternatively, use the smart follow-unfollow method for a streamlined approach\n    ln.smart_follow_unfollow(\n        min_mutual=0,\n        max_mutual=500,\n        withdraw_invite_older_than_days=14,\n        max_invitations_to_send=0,\n        users_preferred=[\"Quant\"],  # file_path or list of features\n        users_not_preferred=[\"Sportsman\"],  # file_path or list of features\n        remove_recommendations=True, # remove recommendations which do not match criteria\n    )\n\n    # Additional method\n    ln.remove_recommendations(min_mutual=10, max_mutual=500)\n\n    # Search for people\n    ln.search_people(\"Microsoft Recruiter\")\n```\n\n### Command Line Usage\n\n**AutoLinkedIn** provides a convenient command-line interface for easy interaction. You can execute tasks directly from the command line with options like:\n\n```bash\npython -m autolinkedin -h\n```\n\nThis command will display a list of available options, allowing you to configure and execute LinkedIn tasks without writing scripts.\n\n```bash\n\u003e python -m autolinkedin -h\nusage: autolinkedin [-h] [--env ENV] [--email EMAIL] [--password PASSWORD] [--browser BROWSER] [--headless] [--maxinvite MAXINVITE] [--minmutual MINMUTUAL] [--maxmutual MAXMUTUAL] [--withdrawdays WITHDRAWDAYS]\n                   [--preferred PREFERRED] [--notpreferred NOTPREFERRED] [--cronfile CRONFILE] [--cronuser CRONUSER] [--rmcron | --no-rmcron] [--cronhour CRONHOUR]\n\noptions:\n  -h, --help            show this help message and exit\n  --env ENV             Linkedin environment file\n  --email EMAIL         Email of LinkedIn user\n  --password PASSWORD   Password of LinkedIn user\n  --browser BROWSER     Browser used for LinkedIn\n  --headless            Whether to run headless (i.e. without the browser visible in the front.)\n  --maxinvite MAXINVITE\n                        Maximum number of invitations to send\n  --minmutual MINMUTUAL\n                        Minimum number of mutual connections required.\n  --maxmutual MAXMUTUAL\n                        Maximum number of mutual connections required.\n  --withdrawdays WITHDRAWDAYS\n                        Withdraw invites older than this many days\n  --preferred PREFERRED\n                        Path to file containing preferred users characteristics\n  --notpreferred NOTPREFERRED\n                        Path to file containing characteristics of not preferred users\n  --cronfile CRONFILE   Path to cronfile\n  --cronuser CRONUSER   Name of user setting cron on the machine (needed by most OS)\n  --rmcron, --no-rmcron\n                        Whether to remove existing crons.\n  --cronhour CRONHOUR   hour of the day you want to set cron for each day.\n```\n\n### Setting Up Cron Jobs\n\nTo schedule recurring tasks, you can set up cron jobs using **AutoLinkedIn**. Here's how:\n\n1. Start with the following commands. (Use `example.env` as a reference while setting `.env` values)\n\n```bash\npython -m autolinkedin --env .env\n```\n\n2. You can supply `--rmcron` to remove existing cron jobs:\n\n```bash\npython -m autolinkedin --rmcron --cronuser osuser\n```\n\n3. To create a new cron job, specify the desired settings:\n\n```bash\npython -m autolinkedin --cronfile .cron.env --cronuser osuser --cronhour 23\n```\n\nThese cron jobs enable you to automate your LinkedIn tasks at specific times, enhancing your networking efficiency.\n\n### Extras\n\n**AutoLinkedIn** heavily relies on another package I authored named [SeleniumTabs](https://github.com/inquilabee/selenium-tabs). Feel free to explore that package for additional functionality.\n\n### example.env\n\n```bash\nLINKEDIN_USER=\nLINKEDIN_PASSWORD=\nLINKEDIN_BROWSER=Chrome\nLINKEDIN_BROWSER_HEADLESS=1\nLINKEDIN_PREFERRED_USER=data/users_preferred.txt\nLINKEDIN_NOT_PREFERRED_USER=data/users_not_preferred.txt\nLINKEDIN_MIN_MUTUAL=0\nLINKEDIN_MAX_MUTUAL=500\nLINKEDIN_MAX_INVITE=0\nLINKEDIN_WITHDRAW_INVITE_BEFORE_DAYS=14\n```\n\n### TODOs\n\n- Enhance documentation\n- Include comprehensive tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finquilabee%2FLinkedinPy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finquilabee%2FLinkedinPy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finquilabee%2FLinkedinPy/lists"}