Package: autolinkedin
AutoLinkedInElevate your LinkedIn game withAutoLinkedIn, 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.Key FeaturesLogin to LinkedIn: Seamlessly access your LinkedIn account.Send Connection Requests: Customize your connection requests by filtering users based on mutual connections, user types, and more.Accept Connection Requests: Simplify the process of accepting incoming connection requests.Delete/Withdraw Sent Requests: Keep your connection list clean by removing outdated sent requests.Smart Follow-Unfollow: Automatically manage connections, delete aged requests, and maximize your daily interactions within LinkedIn's limits.Background Mode: Run all tasks in the background mode without interfering with your regular work.Search: Search for people.Getting StartedTo get started withAutoLinkedIn, first, install the package from PyPi using the following command:pipinstallautolinkedinNext, you can run and test the package by creating a script similar toautolinkedin/scripts/sample_script.py. Start by running your script withheadless=Falseto ensure everything works as expected. Once you're confident, switch toheadless=Trueto run your script in the background.Here's a simplified example of runningAutoLinkedIn:fromautolinkedin.linkedinimportLinkedInwithLinkedIn(username="<username/email>",password="<pas$word>",browser="<Chrome/Firefox>",headless="<True/False>",)asln:# Perform LinkedIn actions hereln.withdraw_sent_invitations(older_than_days=14)last_week_invitations=ln.count_invitations_sent_last_week()ln.send_invitations(max_invitations=max(ln.WEEKLY_MAX_INVITATION-last_week_invitations,0),min_mutual=10,max_mutual=450,preferred_users=["Quant","Software"],# file_path or list of featuresnot_preferred_users=["Sportsman","Doctor"],# file_path or list of featuresview_profile=True,# (recommended) view profile of users you sent connection requests to)ln.accept_invitations()# Customize your actions as needed# ...# Alternatively, use the smart follow-unfollow method for a streamlined approachln.smart_follow_unfollow(min_mutual=0,max_mutual=500,withdraw_invite_older_than_days=14,max_invitations_to_send=0,users_preferred=["Quant"],# file_path or list of featuresusers_not_preferred=["Sportsman"],# file_path or list of featuresremove_recommendations=True,# remove recommendations which do not match criteria)# Additional methodln.remove_recommendations(min_mutual=10,max_mutual=500)# Search for peopleln.search_people("Microsoft Recruiter")Command Line UsageAutoLinkedInprovides a convenient command-line interface for easy interaction. You can execute tasks directly from the command line with options like:python-mautolinkedin-hThis command will display a list of available options, allowing you to configure and execute LinkedIn tasks without writing scripts.>python-mautolinkedin-h
usage:autolinkedin[-h][--envENV][--emailEMAIL][--passwordPASSWORD][--browserBROWSER][--headless][--maxinviteMAXINVITE][--minmutualMINMUTUAL][--maxmutualMAXMUTUAL][--withdrawdaysWITHDRAWDAYS][--preferredPREFERRED][--notpreferredNOTPREFERRED][--cronfileCRONFILE][--cronuserCRONUSER][--rmcron|--no-rmcron][--cronhourCRONHOUR]options:-h,--helpshowthishelpmessageandexit--envENVLinkedinenvironmentfile--emailEMAILEmailofLinkedInuser--passwordPASSWORDPasswordofLinkedInuser--browserBROWSERBrowserusedforLinkedIn--headlessWhethertorunheadless(i.e.withoutthebrowservisibleinthefront.)--maxinviteMAXINVITEMaximumnumberofinvitationstosend--minmutualMINMUTUALMinimumnumberofmutualconnectionsrequired.--maxmutualMAXMUTUALMaximumnumberofmutualconnectionsrequired.--withdrawdaysWITHDRAWDAYSWithdrawinvitesolderthanthismanydays--preferredPREFERREDPathtofilecontainingpreferreduserscharacteristics--notpreferredNOTPREFERREDPathtofilecontainingcharacteristicsofnotpreferredusers--cronfileCRONFILEPathtocronfile--cronuserCRONUSERNameofusersettingcrononthemachine(neededbymostOS)--rmcron,--no-rmcronWhethertoremoveexistingcrons.--cronhourCRONHOURhourofthedayyouwanttosetcronforeachday.Setting Up Cron JobsTo schedule recurring tasks, you can set up cron jobs usingAutoLinkedIn. Here's how:Start with the following commands. (Useexample.envas a reference while setting.envvalues)python-mautolinkedin--env.envYou can supply--rmcronto remove existing cron jobs:python-mautolinkedin--rmcron--cronuserosuserTo create a new cron job, specify the desired settings:python-mautolinkedin--cronfile.cron.env--cronuserosuser--cronhour23These cron jobs enable you to automate your LinkedIn tasks at specific times, enhancing your networking efficiency.ExtrasAutoLinkedInheavily relies on another package I authored namedSeleniumTabs. Feel free to explore that package for additional functionality.example.envLINKEDIN_USER=LINKEDIN_PASSWORD=LINKEDIN_BROWSER=ChromeLINKEDIN_BROWSER_HEADLESS=1LINKEDIN_PREFERRED_USER=data/users_preferred.txtLINKEDIN_NOT_PREFERRED_USER=data/users_not_preferred.txtLINKEDIN_MIN_MUTUAL=0LINKEDIN_MAX_MUTUAL=500LINKEDIN_MAX_INVITE=0LINKEDIN_WITHDRAW_INVITE_BEFORE_DAYS=14TODOsEnhance documentationInclude comprehensive tests