├── .github └── FUNDING.yml ├── .gitignore ├── BOT_monitor.pbix ├── LICENSE ├── README.md ├── changelog.md ├── config.yaml ├── linkedineasyapply.py ├── main.py └── requirements.txt /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [voidbydefault] 2 | custom: ["https://www.paypal.com/paypalme/voidbydefault"] 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | failedRemote.csv 2 | outputRemote.csv 3 | unprepared_questions.csv 4 | .idea/ 5 | **/__pycache__/ 6 | -------------------------------------------------------------------------------- /BOT_monitor.pbix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/voidbydefault/EasyApplyBot/02665519f3201ef7b44b71668f50cfffa7c011c4/BOT_monitor.pbix -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LinkedIn Easy Apply Bot 2 | 3 | _Automate your LinkedIn job applications with ease!_ 4 | 5 | This Python and Selenium-based bot automates applying to jobs using the Easy Apply feature on LinkedIn. 6 | 7 | _26-Jul-24: If you are getting `OSError: [WinError 193] %1 is not a valid Win32 application`, 8 | please delete `chromedriver` from your user directory \drivers\chromedriver (use Google to find how). See 9 | [here](https://github.com/voidbydefault/EasyApplyBot/issues/64#issuecomment-2253114234)._ 10 | 11 | ## Key Features 12 | 13 | - Apply to thousands of jobs effortlessly. 14 | - Track application dates and times for performance analysis. (New!) 15 | 16 | ## Important 17 | 18 | - Use at your own risk. LinkedIn may restrict or suspend accounts for bot usage (hasn't happened so far). 19 | - Consider this an educational project. 20 | 21 | ## Getting Started 22 | 23 | - Watch the video tutorial 24 | on [YouTube](https://youtu.be/oQEAcAur4Vk) and previous video [YouTube](https://youtu.be/IXflenwJzhQ). 25 | 26 | ## Additional Resources 27 | 28 | - "Bot monitor" BI dashboard setup: Watch this [YouTube](https://youtu.be/4LH8WTrMCxw) video. 29 | - **Troubleshooting:** Encounter errors? Ensure dependencies are installed. 30 | - **Need assistance?** Comment under my Youtube videos for general inquiries. 31 | - **Genuine issues** Raise issues page at my GitHub. 32 | 33 | ## Support This Project 34 | 35 | Buy me a coffee through [PayPal](https://paypal.me/voidbydefault) if you find this tool helpful! 36 | 37 | ## Credits 38 | 39 | - Original developer: [Nathan Duma](https://github.com/NathanDuma) 40 | - Significant code updates: [Micheal Dingess](https://github.com/madingess/) 41 | - Maintenance and improvements: [voidbydefault](https://github.com/voidbydefault) 42 | -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | # Change log # 2 | 3 | ### December 2024 update: ### 4 | 1. Adopt frontend changes by LinkedIn that were failing the bot. Thanks to [madingess](https://github.com/madingess/EasyApplyBot/). 5 | 6 | ### September 2024 update: ### 7 | 1. Introduced functionality to use previous Chrome session to avoid new login everytime. 8 | 2. Updated PowerBI dashboard (named to `BOT_monitor.pbix`). 9 | 3. Dropped the dea of `exe` version of the bot after unnecessary issues with Windows antivirus. 10 | 4. Changed directory structure due to # 3 and help new users should get a prompt to install `requirements.txt` automatically. 11 | 5. Improved log generation. 12 | 13 | ### July 2024 update: ### 14 | 1. Fixed backend change by LinkedIn in job titles 15 | 2. Added more non-English error prompts 16 | 3. Added feature to log job location and search location in CSV logs 17 | 4. Enforced UTF-8 encoding for CSV logs to avoid encoding errors 18 | 19 | ### January 2024 update: ### 20 | 1. Bug fix to allow proper use of `Job Type` filter (e.g. full-time, contract, etc.) 21 | 22 | ### December 2023 updates: ### 23 | **Major change** 24 | 25 | The LinkedIn Easy Apply bot will soon be available as a Windows executable, so users will be 26 | able to run the bot without setting up the Python environment and related hassles. As easy as 27 | simply downloading and unzipping the app, configuring `config.yaml` for user-specific changes 28 | and running. 29 | 30 | This required changes in the directory structure, summarized as follows: 31 | 32 | 1. Moved `main.py` and `linkedineasyapply` to `app` directory for packaging the exe file. 33 | 2. All other files in root folder. 34 | 35 | Source code is still open-source for tech-savvy people who wish to run bot under the Python 36 | environment. 37 | 38 | **Routine changes** 39 | 40 | Updates to `config.yaml`: 41 | 1. Added certification/licensing option in `config.yaml` as `True` or `False` (certain 42 | professions require confirmation, e.g. CPAs, lawyers, engineers, etc.). 43 | 44 | Updates to `linkedineasyapply.py`: 45 | 1. Improved prompts and messages generated by the bot. 46 | 2. Updated functionality to enable responses to `certification` and `licensing` questions. 47 | 3. Improved handling of demographics (gender, aboriginal, veteran, etc.) 48 | 49 | Updates to `main.py`: 50 | 1. Cross-updated the above changes. 51 | 52 | ### October 2023 updates: ### 53 | Following changes have been made in `config.yaml` and `linkedineasyapply.py`: 54 | 55 | 1. Added `residentStatus:` in `config.yaml` 56 | 2. Added `Pronouns` in `config.yaml` 57 | 3. Improved exceptions handling in `linkedineasyapply.py` to avoid bot getting stuck in some applications. 58 | 4. Corresponding changes in `main.py` 59 | 5. Fixed 'company name not captured' in *csv (issue#30). 60 | -------------------------------------------------------------------------------- /config.yaml: -------------------------------------------------------------------------------- 1 | # Add your LinkedIn email ID and password. 2 | # *** WARNING: KEEP THIS CONFIG OFFLINE ON YOUR PC AND DO NOT COMMIT/UPLOAD *** 3 | email: email@domain.com 4 | password: yourpassword 5 | 6 | # Anti-lock default is False to prevent your PC from sleeping to 7 | # allow bot to run uninterrupted. Set it to True if you wish to 8 | # disable this functionality. 9 | disableAntiLock: False 10 | 11 | # Set to True if you wish to search for remote jobs only. 12 | remote: False 13 | 14 | # Set to True if you wish to search for jobs marked as "under 10 15 | # applicants" (default is False). 16 | lessthanTenApplicants: False 17 | 18 | # Set to True or False to suit your preference. Multiple True allowed. 19 | experienceLevel: 20 | internship: False 21 | entry: True 22 | associate: True 23 | mid-senior level: True 24 | director: False 25 | executive: False 26 | 27 | # Set to True or False to suit your preference. Multiple True allowed. 28 | jobTypes: 29 | full-time: True 30 | contract: True 31 | part-time: False 32 | temporary: True 33 | internship: False 34 | other: False 35 | volunteer: False 36 | 37 | # Set ONLY one as True to suit your preference. 38 | date: 39 | all time: True 40 | month: False 41 | week: False 42 | 24 hours: False 43 | 44 | # Remove hash sign to add positions. You can add as many as you need, 45 | # but preserve formatting 46 | positions: 47 | #- First position 48 | #- A second position 49 | #- A third position 50 | #- ... 51 | 52 | # Remove hash sign to add locations. You can add as many as you need 53 | # including adding 'Remote' as a location but first location must be 54 | # a valid country. 55 | locations: 56 | #- First location 57 | #- A second location 58 | #- A third location 59 | #- ... 60 | #- Remote 61 | 62 | # Set to True if you are residing in the country of job 63 | residentStatus: False 64 | 65 | # Distance from the location added above. Allowed values are 66 | # {0, 5, 10, 25, 50, 100}, use only one. 67 | distance: 100 68 | 69 | # Optional directory to save logs, does not work sometimes. 70 | # Does not work sometimes, so leave it unchanged. 71 | outputFileDirectory: ~/Documents/Applications/EasyApplyBot/EasyApplyBot/ 72 | 73 | # Companies you don't want to apply. 74 | companyBlacklist: 75 | #- company 76 | #- company2 77 | 78 | # Job titles you want to avoid applying. Use it to refine performance of bot. 79 | titleBlacklist: 80 | #- word1 81 | #- word2 82 | 83 | # Bot will not apply to jobs posted by black listed people. 84 | posterBlacklist: 85 | #- name1 86 | #- name2 87 | 88 | # Path to your CV/resume and cover letter (remove hash sign). These 89 | # paths often don't work so apply one job manually once, bot will 90 | # reuse manually uploaded CV for automating the task. Note: Prefer 91 | # a path without spaces, i.e. instead of "Me My" to "MeMy" or "Me_My". 92 | uploads: 93 | resume: C:\Users\myDirectory\Resume.pdf 94 | # Cover letter is optional 95 | #coverLetter: C:\Users\myDirectory\CoverLettter.pdf 96 | 97 | 98 | # ------------ QA section ------------------- 99 | 100 | # ------------ Additional parameters: checkboxes --------------- 101 | checkboxes: 102 | # Do you have a valid driver's license? (yes/no checkbox) 103 | driversLicence: True 104 | # Will you now, or in the future, require sponsorship for 105 | # employment visa status (e.g. H-1B visa status)? (yes/no checkbox) 106 | # This is relative to the location and your citizenship applying 107 | # above, and same with legallyAuthorized. 108 | requireVisa: False 109 | # Are you legally authorized to work in COUNTRY? (yes/no checkbox) 110 | legallyAuthorized: False 111 | # Do you have necessary licenses or certifications required in your 112 | # profession? E.g. CPA, CA, CFA, professional license 113 | certifiedProfessional: True 114 | # We must fill this position urgently. Can you start immediately? 115 | # (yes/no checkbox) 116 | urgentFill: True 117 | # Are you comfortable commuting or work on-site to this job's location? 118 | # (yes/no checkbox) 119 | commute: True 120 | # Are you comfortable working in a remote environment? (yes/no checkbox) 121 | remote: True 122 | # Are you comfortable taking a drug in accordance with local/state laws? 123 | # (yes/no checkbox) 124 | drugTest: True 125 | # Are you willing to complete an assessment? (yes/no checkbox) 126 | assessment: True 127 | # Do you have security clearance of [xxx] country? (yes/no checkbox) 128 | securityClearance: False 129 | # Have you completed the following level of education: DEGREE TYPE? Remove 130 | # applicable # signs (yes/no checkbox) 131 | degreeCompleted: 132 | - High School Diploma 133 | - Bachelor's Degree 134 | # - Associate's Degree 135 | # - Master's Degree 136 | # - Master of Business Administration 137 | # - Doctor of Philosophy 138 | # - Doctor of Medicine 139 | # - Doctor of Law 140 | # Are you willing to undergo a background check, in accordance with local 141 | # law/regulations? 142 | backgroundCheck: True 143 | 144 | # ------------ Additional parameters: universityGpa --------------- 145 | universityGpa: 4.0 146 | 147 | # ------------ Additional parameters: salaryMinimum --------------- 148 | salaryMinimum: 65000 149 | 150 | # ------------ Additional parameters: languages --------------- 151 | languages: 152 | english: Native or bilingual # Allowed choices { None, Conversational, Professional, Native or bilingual } 153 | # arabic: Conversational 154 | # french: Professional 155 | 156 | # ------------ Additional parameters: noticePeriod in weeks --------------- 157 | noticePeriod: 2 158 | 159 | # ------------ Additional parameters: years of experience --------------- 160 | # How many years of work experience do you have ...? (whole numbers only). 161 | # You may add more skills depending on your industry or profession at the bottom. 162 | # Use `unprepared questions.csv` to add more depending on your use case. 163 | # A few samples are added below, you may not need all of these. 'default' 164 | # value will be used as a fall-back input to additional questions. 165 | experience: 166 | # normal ones 167 | Accounting/Auditing: 0 168 | Administrative : 0 169 | Advertising : 0 170 | Analyst : 0 171 | Art/Creative: 0 172 | Business Development: 0 173 | Consulting: 0 174 | Customer Service: 0 175 | Distribution Design: 0 176 | Education: 0 177 | Engineering: 0 178 | Finance: 0 179 | General Business: 0 180 | Health Care Provider: 0 181 | Human Resources: 0 182 | Information Technology: 0 183 | Legal: 0 184 | Management: 0 185 | Manufacturing: 0 186 | Marketing: 0 187 | Public Relations: 0 188 | Purchasing: 0 189 | Product Management: 0 190 | Project Management: 0 191 | Production: 0 192 | Quality Assurance: 0 193 | Research: 0 194 | Sales: 0 195 | Science: 0 196 | Strategy/Planning: 0 197 | Supply Chain: 0 198 | Training: 0 199 | Writing/Editing: 0 200 | VBA: 0 201 | PowerBI: 0 202 | PowerQuery: 0 203 | Excel: 0 204 | PowerPoint: 0 205 | Word: 0 206 | SQL Server: 0 207 | Communication: 0 208 | Financial markets: 0 209 | Business: 0 210 | Financial services: 0 211 | Team leadership: 0 212 | Cash flow: 0 213 | Hedging: 0 214 | Treasury services: 0 215 | Microsoft Power BI: 0 216 | Accounting: 0 217 | Auditing: 0 218 | Financial modeling: 0 219 | Budgeting & forecasting: 0 220 | FP&A: 0 221 | PQE: 0 222 | Training & Development: 0 223 | #python: 0 224 | #selenium: 0 225 | # default to put for any industry/skill that you did not list 226 | default: 0 227 | 228 | # ------------ Additional parameters: personal info --------------- 229 | personalInfo: 230 | Pronouns: Mr. 231 | First Name: FirstName 232 | Last Name: LastName 233 | Phone Country Code: Canada (+1) # See Linkedin for your country code, must be exact according to the international platform, i.e. Italy (+39) not Italia (+39) 234 | Mobile Phone Number: 1234567890 235 | Street address: 123 Fake Street 236 | City: Red Deer, Alberta # Include the state/province as well! 237 | State: YourState 238 | Zip: YourZip/Postal 239 | Linkedin: https://www.linkedin.com/in/my-linkedin-profile 240 | Website: https://www.my-website.com # github/website is interchangeable here 241 | MessageToManager: "Hi, I am interested to join your organization. Please have a look at my resume. Thank you." # Keep message short and within the quotes. This is a testing feature and may not work. 242 | 243 | # ------------ Additional parameters: USA employment crap --------------- 244 | eeo: 245 | gender: None 246 | race: None 247 | veteran: None 248 | disability: None 249 | citizenship: yes 250 | clearance: no 251 | -------------------------------------------------------------------------------- /linkedineasyapply.py: -------------------------------------------------------------------------------- 1 | import time, random, csv, pyautogui, pdb, traceback, sys, os 2 | from selenium.webdriver.support.ui import WebDriverWait 3 | from selenium.webdriver.support import expected_conditions as EC 4 | from selenium.common.exceptions import TimeoutException 5 | from selenium.common.exceptions import StaleElementReferenceException 6 | from selenium.common.exceptions import NoSuchElementException 7 | from selenium.webdriver.common.keys import Keys 8 | from selenium.webdriver.common.by import By 9 | from selenium.webdriver.support.ui import Select 10 | from datetime import date, datetime 11 | from itertools import product 12 | 13 | class LinkedinEasyApply: 14 | def __init__(self, parameters, driver): 15 | self.browser = driver 16 | self.email = parameters['email'] 17 | self.password = parameters['password'] 18 | self.disable_lock = parameters['disableAntiLock'] 19 | self.company_blacklist = parameters.get('companyBlacklist', []) or [] 20 | self.title_blacklist = parameters.get('titleBlacklist', []) or [] 21 | self.poster_blacklist = parameters.get('posterBlacklist', []) or [] 22 | self.positions = parameters.get('positions', []) 23 | self.locations = parameters.get('locations', []) 24 | self.residency = parameters.get('residentStatus', []) 25 | self.base_search_url = self.get_base_search_url(parameters) 26 | self.seen_jobs = [] 27 | self.file_name = "output" 28 | self.unprepared_questions_file_name = "unprepared_questions" 29 | self.output_file_directory = parameters['outputFileDirectory'] 30 | self.resume_dir = parameters['uploads']['resume'] 31 | if 'coverLetter' in parameters['uploads']: 32 | self.cover_letter_dir = parameters['uploads']['coverLetter'] 33 | else: 34 | self.cover_letter_dir = '' 35 | self.checkboxes = parameters.get('checkboxes', []) 36 | self.university_gpa = parameters['universityGpa'] 37 | self.salary_minimum = parameters['salaryMinimum'] 38 | self.notice_period = int(parameters['noticePeriod']) 39 | self.languages = parameters.get('languages', []) 40 | self.experience = parameters.get('experience', []) 41 | self.personal_info = parameters.get('personalInfo', []) 42 | self.eeo = parameters.get('eeo', []) 43 | self.experience_default = int(self.experience['default']) 44 | 45 | def login(self): 46 | try: 47 | # Check if the "chrome_bot" directory exists 48 | print("Attempting to restore previous session...") 49 | if os.path.exists("chrome_bot"): 50 | self.browser.get("https://www.linkedin.com/feed/") 51 | time.sleep(random.uniform(5, 10)) 52 | 53 | # Check if the current URL is the feed page 54 | if self.browser.current_url != "https://www.linkedin.com/feed/": 55 | print("Feed page not loaded, proceeding to login.") 56 | self.load_login_page_and_login() 57 | else: 58 | print("No session found, proceeding to login.") 59 | self.load_login_page_and_login() 60 | 61 | except TimeoutException: 62 | print("Timeout occurred, checking for security challenges...") 63 | self.security_check() 64 | # raise Exception("Could not login!") 65 | 66 | def security_check(self): 67 | current_url = self.browser.current_url 68 | page_source = self.browser.page_source 69 | 70 | if '/checkpoint/challenge/' in current_url or 'security check' in page_source or 'quick verification' in page_source or 'Check your LinkedIn app' in page_source: 71 | input("Please complete the security check and press enter on this console when it is done.") 72 | time.sleep(random.uniform(5.5, 10.5)) 73 | 74 | def load_login_page_and_login(self): 75 | self.browser.get("https://www.linkedin.com/login") 76 | 77 | # Wait for the username field to be present 78 | WebDriverWait(self.browser, 10).until( 79 | EC.presence_of_element_located((By.ID, "username")) 80 | ) 81 | 82 | self.browser.find_element(By.ID, "username").send_keys(self.email) 83 | self.browser.find_element(By.ID, "password").send_keys(self.password) 84 | self.browser.find_element(By.CSS_SELECTOR, ".btn__primary--large").click() 85 | 86 | # Wait for the feed page to load after login 87 | WebDriverWait(self.browser, 10).until( 88 | EC.url_contains("https://www.linkedin.com/feed/") 89 | ) 90 | 91 | time.sleep(random.uniform(5, 10)) 92 | 93 | def start_applying(self): 94 | searches = list(product(self.positions, self.locations)) 95 | random.shuffle(searches) 96 | 97 | page_sleep = 0 98 | minimum_time = 60 * 15 # minimum time bot should run before taking a break 99 | minimum_page_time = time.time() + minimum_time 100 | 101 | for (position, location) in searches: 102 | location_url = "&location=" + location 103 | job_page_number = -1 104 | 105 | print("Starting the search for " + position + " in " + location + ".") 106 | 107 | try: 108 | while True: 109 | page_sleep += 1 110 | job_page_number += 1 111 | print("Going to job page " + str(job_page_number)) 112 | self.next_job_page(position, location_url, job_page_number) 113 | time.sleep(random.uniform(1.5, 3.5)) 114 | print("Starting the application process for this page...") 115 | self.apply_jobs(location) 116 | print("Job applications on this page have been successfully completed.") 117 | 118 | time_left = minimum_page_time - time.time() 119 | if time_left > 0: 120 | print("Sleeping for " + str(time_left) + " seconds.") 121 | time.sleep(time_left) 122 | minimum_page_time = time.time() + minimum_time 123 | if page_sleep % 5 == 0: 124 | sleep_time = random.randint(180, 300) # Changed from 500, 900 {seconds} 125 | print("Sleeping for " + str(sleep_time / 60) + " minutes.") 126 | time.sleep(sleep_time) 127 | page_sleep += 1 128 | except: 129 | traceback.print_exc() 130 | pass 131 | 132 | time_left = minimum_page_time - time.time() 133 | if time_left > 0: 134 | print("Sleeping for " + str(time_left) + " seconds.") 135 | time.sleep(time_left) 136 | minimum_page_time = time.time() + minimum_time 137 | if page_sleep % 5 == 0: 138 | sleep_time = random.randint(500, 900) 139 | print("Sleeping for " + str(sleep_time / 60) + " minutes.") 140 | time.sleep(sleep_time) 141 | page_sleep += 1 142 | 143 | def apply_jobs(self, location): 144 | no_jobs_text = "" 145 | try: 146 | no_jobs_element = self.browser.find_element(By.CLASS_NAME, 147 | 'jobs-search-two-pane__no-results-banner--expand') 148 | no_jobs_text = no_jobs_element.text 149 | except: 150 | pass 151 | if 'No matching jobs found' in no_jobs_text: 152 | raise Exception("No more jobs on this page.") 153 | 154 | if 'unfortunately, things are' in self.browser.page_source.lower(): 155 | raise Exception("No more jobs on this page.") 156 | 157 | job_results_header = "" 158 | maybe_jobs_crap = "" 159 | job_results_header = self.browser.find_element(By.CLASS_NAME, "jobs-search-results-list__text") 160 | maybe_jobs_crap = job_results_header.text 161 | 162 | if 'Jobs you may be interested in' in maybe_jobs_crap: 163 | raise Exception("Nothing to do here, moving forward...") 164 | 165 | try: 166 | # Define the XPaths for potentially different regions 167 | xpath_region1 = "/html/body/div[6]/div[3]/div[4]/div/div/main/div/div[2]/div[1]/div" 168 | xpath_region2 = "/html/body/div[5]/div[3]/div[4]/div/div/main/div/div[2]/div[1]/div" 169 | job_list = [] 170 | 171 | # Attempt to locate the element using XPaths 172 | try: 173 | job_results = self.browser.find_element(By.XPATH, xpath_region1) 174 | ul_xpath = "/html/body/div[6]/div[3]/div[4]/div/div/main/div/div[2]/div[1]/div/ul" 175 | ul_element = self.browser.find_element(By.XPATH, ul_xpath) 176 | ul_element_class = ul_element.get_attribute("class").split()[0] 177 | print(f"Found using xpath_region1 and detected ul_element as {ul_element_class} based on {ul_xpath}") 178 | 179 | except NoSuchElementException: 180 | job_results = self.browser.find_element(By.XPATH, xpath_region2) 181 | ul_xpath = "/html/body/div[5]/div[3]/div[4]/div/div/main/div/div[2]/div[1]/div/ul" 182 | ul_element = self.browser.find_element(By.XPATH, ul_xpath) 183 | ul_element_class = ul_element.get_attribute("class").split()[0] 184 | print(f"Found using xpath_region2 and detected ul_element as {ul_element_class} based on {ul_xpath}") 185 | 186 | # Extract the random class name dynamically 187 | random_class = job_results.get_attribute("class").split()[0] 188 | print(f"Random class detected: {random_class}") 189 | 190 | # Use the detected class name to find the element 191 | job_results_by_class = self.browser.find_element(By.CSS_SELECTOR, f".{random_class}") 192 | print(f"job_results: {job_results_by_class}") 193 | print("Successfully located the element using the random class name.") 194 | 195 | # Scroll logic (currently disabled for testing) 196 | self.scroll_slow(job_results_by_class) # Scroll down 197 | self.scroll_slow(job_results_by_class, step=300, reverse=True) # Scroll up 198 | 199 | # Find job list elements 200 | job_list = self.browser.find_elements(By.CLASS_NAME, ul_element_class)[0].find_elements(By.CLASS_NAME, 'scaffold-layout__list-item') 201 | print(f"List of jobs: {job_list}") 202 | 203 | if len(job_list) == 0: 204 | raise Exception("No more jobs on this page.") 205 | 206 | except NoSuchElementException: 207 | print("No job results found using the specified XPaths or class.") 208 | 209 | except Exception as e: 210 | print(f"An unexpected error occurred: {e}") 211 | 212 | for job_tile in job_list: 213 | job_title, company, poster, job_location, apply_method, link = "", "", "", "", "", "" 214 | 215 | try: 216 | ## patch to incorporate new 'verification' crap by LinkedIn 217 | # job_title = job_tile.find_element(By.CLASS_NAME, 'job-card-list__title').text # original code 218 | job_title_element = job_tile.find_element(By.CLASS_NAME, 'job-card-list__title--link') 219 | job_title = job_title_element.find_element(By.TAG_NAME, 'strong').text 220 | 221 | link = job_tile.find_element(By.CLASS_NAME, 'job-card-list__title--link').get_attribute('href').split('?')[0] 222 | except: 223 | pass 224 | try: 225 | # company = job_tile.find_element(By.CLASS_NAME, 'job-card-container__primary-description').text # original code 226 | company = job_tile.find_element(By.CLASS_NAME, 'artdeco-entity-lockup__subtitle').text 227 | except: 228 | pass 229 | try: 230 | # get the name of the person who posted for the position, if any is listed 231 | hiring_line = job_tile.find_element(By.XPATH, '//span[contains(.,\' is hiring for this\')]') 232 | hiring_line_text = hiring_line.text 233 | name_terminating_index = hiring_line_text.find(' is hiring for this') 234 | if name_terminating_index != -1: 235 | poster = hiring_line_text[:name_terminating_index] 236 | except: 237 | pass 238 | try: 239 | job_location = job_tile.find_element(By.CLASS_NAME, 'job-card-container__metadata-item').text 240 | except: 241 | pass 242 | try: 243 | apply_method = job_tile.find_element(By.CLASS_NAME, 'job-card-container__apply-method').text 244 | except: 245 | pass 246 | 247 | contains_blacklisted_keywords = False 248 | job_title_parsed = job_title.lower().split(' ') 249 | 250 | for word in self.title_blacklist: 251 | if word.lower() in job_title_parsed: 252 | contains_blacklisted_keywords = True 253 | break 254 | 255 | if company.lower() not in [word.lower() for word in self.company_blacklist] and \ 256 | poster.lower() not in [word.lower() for word in self.poster_blacklist] and \ 257 | contains_blacklisted_keywords is False and link not in self.seen_jobs: 258 | try: 259 | max_retries = 3 260 | retries = 0 261 | while retries < max_retries: 262 | try: 263 | job_el = job_tile.find_element(By.CLASS_NAME, 'job-card-list__title--link') 264 | job_el.click() 265 | break 266 | 267 | except StaleElementReferenceException: 268 | retries += 1 269 | continue 270 | 271 | time.sleep(random.uniform(3, 5)) 272 | 273 | try: 274 | done_applying = self.apply_to_job() 275 | if done_applying: 276 | print(f"Application sent to {company} for the position of {job_title}.") 277 | else: 278 | print(f"An application for a job at {company} has been submitted earlier.") 279 | except: 280 | temp = self.file_name 281 | self.file_name = "failed" 282 | print("Failed to apply to job. Please submit a bug report with this link: " + link) 283 | try: 284 | self.write_to_file(company, job_title, link, job_location, location) 285 | except: 286 | pass 287 | self.file_name = temp 288 | print(f'updated {temp}.') 289 | 290 | try: 291 | self.write_to_file(company, job_title, link, job_location, location) 292 | except Exception: 293 | print( 294 | f"Unable to save the job information in the file. The job title {job_title} or company {company} cannot contain special characters,") 295 | traceback.print_exc() 296 | except: 297 | traceback.print_exc() 298 | print(f"Could not apply to the job in {company}") 299 | pass 300 | else: 301 | print(f"Job for {company} by {poster} contains a blacklisted word {word}.") 302 | 303 | self.seen_jobs += link 304 | 305 | def apply_to_job(self): 306 | easy_apply_button = None 307 | 308 | try: 309 | easy_apply_button = self.browser.find_element(By.CLASS_NAME, 'jobs-apply-button') 310 | except: 311 | return False 312 | 313 | try: 314 | job_description_area = self.browser.find_element(By.CLASS_NAME, "jobs-search__job-details--container") 315 | print (f"{job_description_area}") 316 | self.scroll_slow(job_description_area, end=1600) 317 | self.scroll_slow(job_description_area, end=1600, step=400, reverse=True) 318 | except: 319 | pass 320 | 321 | print("Starting the job application...") 322 | easy_apply_button.click() 323 | 324 | button_text = "" 325 | submit_application_text = 'submit application' 326 | while submit_application_text not in button_text.lower(): 327 | try: 328 | self.fill_up() 329 | next_button = self.browser.find_element(By.CLASS_NAME, "artdeco-button--primary") 330 | button_text = next_button.text.lower() 331 | if submit_application_text in button_text: 332 | try: 333 | self.unfollow() 334 | except: 335 | print("Failed to unfollow company.") 336 | time.sleep(random.uniform(1.5, 2.5)) 337 | next_button.click() 338 | time.sleep(random.uniform(3.0, 5.0)) 339 | 340 | # Newer error handling 341 | error_messages = [ 342 | 'enter a valid', 343 | 'enter a decimal', 344 | 'Enter a whole number' 345 | 'Enter a whole number between 0 and 99', 346 | 'file is required', 347 | 'whole number', 348 | 'make a selection', 349 | 'select checkbox to proceed', 350 | 'saisissez un numéro', 351 | '请输入whole编号', 352 | '请输入decimal编号', 353 | '长度超过 0.0', 354 | 'Numéro de téléphone', 355 | 'Introduce un número de whole entre', 356 | 'Inserisci un numero whole compreso', 357 | 'Preguntas adicionales', 358 | 'Insira um um número', 359 | 'Cuántos años' 360 | 'use the format', 361 | 'A file is required', 362 | '请选择', 363 | '请 选 择', 364 | 'Inserisci', 365 | 'wholenummer', 366 | 'Wpisz liczb', 367 | 'zakresu od', 368 | 'tussen' 369 | ] 370 | 371 | if any(error in self.browser.page_source.lower() for error in error_messages): 372 | raise Exception("Failed answering required questions or uploading required files.") 373 | except: 374 | traceback.print_exc() 375 | self.browser.find_element(By.CLASS_NAME, 'artdeco-modal__dismiss').click() 376 | time.sleep(random.uniform(3, 5)) 377 | self.browser.find_elements(By.CLASS_NAME, 'artdeco-modal__confirm-dialog-btn')[0].click() 378 | time.sleep(random.uniform(3, 5)) 379 | raise Exception("Failed to apply to job!") 380 | 381 | closed_notification = False 382 | time.sleep(random.uniform(3, 5)) 383 | try: 384 | self.browser.find_element(By.CLASS_NAME, 'artdeco-modal__dismiss').click() 385 | closed_notification = True 386 | except: 387 | pass 388 | try: 389 | self.browser.find_element(By.CLASS_NAME, 'artdeco-toast-item__dismiss').click() 390 | closed_notification = True 391 | except: 392 | pass 393 | try: 394 | self.browser.find_element(By.CSS_SELECTOR, 'button[data-control-name="save_application_btn"]').click() 395 | closed_notification = True 396 | except: 397 | pass 398 | 399 | time.sleep(random.uniform(3, 5)) 400 | 401 | if closed_notification is False: 402 | raise Exception("Could not close the applied confirmation window!") 403 | 404 | return True 405 | 406 | def home_address(self, form): 407 | print("Trying to fill up home address fields") 408 | try: 409 | groups = form.find_elements(By.CLASS_NAME, 'jobs-easy-apply-form-section__grouping') 410 | if len(groups) > 0: 411 | for group in groups: 412 | lb = group.find_element(By.TAG_NAME, 'label').text.lower() 413 | input_field = group.find_element(By.TAG_NAME, 'input') 414 | if 'street' in lb: 415 | self.enter_text(input_field, self.personal_info['Street address']) 416 | elif 'city' in lb: 417 | self.enter_text(input_field, self.personal_info['City']) 418 | time.sleep(3) 419 | input_field.send_keys(Keys.DOWN) 420 | input_field.send_keys(Keys.RETURN) 421 | elif 'zip' in lb or 'zip / postal code' in lb or 'postal' in lb: 422 | self.enter_text(input_field, self.personal_info['Zip']) 423 | elif 'state' in lb or 'province' in lb: 424 | self.enter_text(input_field, self.personal_info['State']) 425 | else: 426 | pass 427 | except: 428 | pass 429 | 430 | def get_answer(self, question): 431 | if self.checkboxes[question]: 432 | return 'yes' 433 | else: 434 | return 'no' 435 | 436 | def additional_questions(self, form): 437 | print("Trying to fill up additional questions") 438 | 439 | questions = form.find_elements(By.CLASS_NAME, 'fb-dash-form-element') 440 | for question in questions: 441 | try: 442 | # Radio check 443 | radio_fieldset = question.find_element(By.TAG_NAME, 'fieldset') 444 | question_span = radio_fieldset.find_element(By.CLASS_NAME, 'fb-dash-form-element__label').find_elements(By.TAG_NAME, 'span')[0] 445 | radio_text = question_span.text.lower() 446 | print(f"Radio question text: {radio_text}") # TODO: Put logging behind debug flag 447 | 448 | radio_labels = radio_fieldset.find_elements(By.TAG_NAME, 'label') 449 | radio_options = [text.text.lower() for text in radio_labels] 450 | print(f"radio options: {radio_options}") # TODO: Put logging behind debug flag 451 | if len(radio_options) == 0: 452 | raise Exception("No radio options found in question") 453 | 454 | answer = "yes" 455 | 456 | if 'driver\'s licence' in radio_text or 'driver\'s license' in radio_text: 457 | answer = self.get_answer('driversLicence') 458 | 459 | elif any(keyword in radio_text.lower() for keyword in 460 | [ 461 | 'Aboriginal', 'native', 'indigenous', 'tribe', 'first nations', 462 | 'native american', 'native hawaiian', 'inuit', 'metis', 'maori', 463 | 'aborigine', 'ancestral', 'native peoples', 'original people', 464 | 'first people', 'gender', 'race', 'disability', 'latino', 'torres', 465 | 'do you identify' 466 | ]): 467 | negative_keywords = ['prefer', 'decline', 'don\'t', 'specified', 'none', 'no'] 468 | answer = next((option for option in radio_options if 469 | any(neg_keyword in option.lower() for neg_keyword in negative_keywords)), None) 470 | 471 | elif 'assessment' in radio_text: 472 | answer = self.get_answer("assessment") 473 | 474 | elif 'clearance' in radio_text: 475 | answer = self.get_answer("securityClearance") 476 | 477 | elif 'north korea' in radio_text: 478 | answer = 'no' 479 | 480 | elif 'convicted' in radio_text: 481 | answer = 'no' 482 | 483 | elif 'previously employ' in radio_text or 'previous employ' in radio_text: 484 | answer = 'no' 485 | 486 | elif 'authorized' in radio_text or 'authorised' in radio_text or 'legally' in radio_text: 487 | answer = self.get_answer('legallyAuthorized') 488 | 489 | elif any(keyword in radio_text.lower() for keyword in 490 | ['certified', 'certificate', 'cpa', 'chartered accountant', 'qualification']): 491 | answer = self.get_answer('certifiedProfessional') 492 | 493 | elif 'urgent' in radio_text: 494 | answer = self.get_answer('urgentFill') 495 | 496 | elif 'commut' in radio_text or 'on-site' in radio_text or 'hybrid' in radio_text or 'onsite' in radio_text: 497 | answer = self.get_answer('commute') 498 | 499 | elif 'remote' in radio_text: 500 | answer = self.get_answer('remote') 501 | 502 | elif 'background check' in radio_text: 503 | answer = self.get_answer('backgroundCheck') 504 | 505 | elif 'drug test' in radio_text: 506 | answer = self.get_answer('drugTest') 507 | 508 | elif 'currently living' in radio_text or 'currently reside' in radio_text or 'right to live' in radio_text: 509 | answer = self.get_answer('residency') 510 | 511 | elif 'level of education' in radio_text: 512 | for degree in self.checkboxes['degreeCompleted']: 513 | if degree.lower() in radio_text: 514 | answer = "yes" 515 | break 516 | 517 | elif 'experience' in radio_text: 518 | for experience in self.experience: 519 | if experience.lower() in radio_text: 520 | answer = "yes" 521 | break 522 | 523 | elif 'data retention' in radio_text: 524 | answer = 'no' 525 | 526 | elif 'sponsor' in radio_text: 527 | answer = self.get_answer('requireVisa') 528 | else: 529 | answer = radio_options[len(radio_options) - 1] 530 | self.record_unprepared_question("radio", radio_text) 531 | 532 | print(f"Choosing answer: {answer}") # TODO: Put logging behind debug flag 533 | i = 0 534 | to_select = None 535 | for radio in radio_labels: 536 | if answer in radio.text.lower(): 537 | to_select = radio_labels[i] 538 | i += 1 539 | 540 | if to_select is None: 541 | to_select = radio_labels[len(radio_labels) - 1] 542 | 543 | to_select.click() 544 | 545 | if radio_labels: 546 | continue 547 | except: 548 | print("An exception occurred while filling up radio field") # TODO: Put logging behind debug flag 549 | 550 | # Questions check 551 | try: 552 | question_text = question.find_element(By.TAG_NAME, 'label').text.lower() 553 | print( question_text ) # TODO: Put logging behind debug flag 554 | 555 | txt_field_visible = False 556 | try: 557 | txt_field = question.find_element(By.TAG_NAME, 'input') 558 | txt_field_visible = True 559 | except: 560 | try: 561 | txt_field = question.find_element(By.TAG_NAME, 'textarea') # TODO: Test textarea 562 | txt_field_visible = True 563 | except: 564 | raise Exception("Could not find textarea or input tag for question") 565 | 566 | text_field_type = txt_field.get_attribute('type').lower() 567 | if 'numeric' in text_field_type: # TODO: test numeric type 568 | text_field_type = 'numeric' 569 | elif 'text' in text_field_type: 570 | text_field_type = 'text' 571 | else: 572 | raise Exception("Could not determine input type of input field!") 573 | 574 | to_enter = '' 575 | if 'experience' in question_text or 'how many years in' in question_text: 576 | no_of_years = None 577 | for experience in self.experience: 578 | if experience.lower() in question_text: 579 | no_of_years = int(self.experience[experience]) 580 | break 581 | if no_of_years is None: 582 | self.record_unprepared_question(text_field_type, question_text) 583 | no_of_years = int(self.experience_default) 584 | to_enter = no_of_years 585 | 586 | elif 'grade point average' in question_text: 587 | to_enter = self.university_gpa 588 | 589 | elif 'first name' in question_text: 590 | to_enter = self.personal_info['First Name'] 591 | 592 | elif 'last name' in question_text: 593 | to_enter = self.personal_info['Last Name'] 594 | 595 | elif 'name' in question_text: 596 | to_enter = self.personal_info['First Name'] + " " + self.personal_info['Last Name'] 597 | 598 | elif 'pronouns' in question_text: 599 | to_enter = self.personal_info['Pronouns'] 600 | 601 | elif 'phone' in question_text: 602 | to_enter = self.personal_info['Mobile Phone Number'] 603 | 604 | elif 'linkedin' in question_text: 605 | to_enter = self.personal_info['Linkedin'] 606 | 607 | elif 'message to hiring' in question_text or 'cover letter' in question_text: 608 | to_enter = self.personal_info['MessageToManager'] 609 | 610 | elif 'website' in question_text or 'github' in question_text or 'portfolio' in question_text: 611 | to_enter = self.personal_info['Website'] 612 | 613 | elif 'notice' in question_text or 'weeks' in question_text: 614 | if text_field_type == 'numeric': 615 | to_enter = int(self.notice_period) 616 | else: 617 | to_enter = str(self.notice_period) 618 | 619 | elif 'salary' in question_text or 'expectation' in question_text or 'compensation' in question_text or 'CTC' in question_text: 620 | if text_field_type == 'numeric': 621 | to_enter = int(self.salary_minimum) 622 | else: 623 | to_enter = float(self.salary_minimum) 624 | self.record_unprepared_question(text_field_type, question_text) 625 | 626 | if text_field_type == 'numeric': 627 | if not isinstance(to_enter, (int, float)): 628 | to_enter = 0 629 | elif to_enter == '': 630 | to_enter = " ‏‏‎ " 631 | 632 | self.enter_text(txt_field, to_enter) 633 | continue 634 | except: 635 | print("An exception occurred while filling up text field") # TODO: Put logging behind debug flag 636 | 637 | # Date Check 638 | try: 639 | date_picker = question.find_element(By.CLASS_NAME, 'artdeco-datepicker__input ') 640 | date_picker.clear() 641 | date_picker.send_keys(date.today().strftime("%m/%d/%y")) 642 | time.sleep(3) 643 | date_picker.send_keys(Keys.RETURN) 644 | time.sleep(2) 645 | continue 646 | except: 647 | print("An exception occurred while filling up date picker field") # TODO: Put logging behind debug flag 648 | 649 | # Dropdown check 650 | try: 651 | question_text = question.find_element(By.TAG_NAME, 'label').text.lower() 652 | print(f"Dropdown question text: {question_text}") # TODO: Put logging behind debug flag 653 | dropdown_field = question.find_element(By.TAG_NAME, 'select') 654 | 655 | select = Select(dropdown_field) 656 | options = [options.text for options in select.options] 657 | print(f"Dropdown options: {options}") # TODO: Put logging behind debug flag 658 | 659 | if 'proficiency' in question_text: 660 | proficiency = "None" 661 | for language in self.languages: 662 | if language.lower() in question_text: 663 | proficiency = self.languages[language] 664 | break 665 | self.select_dropdown(dropdown_field, proficiency) 666 | 667 | elif 'clearance' in question_text: 668 | answer = self.get_answer('securityClearance') 669 | 670 | choice = "" 671 | for option in options: 672 | if answer == 'yes': 673 | choice = option 674 | else: 675 | if 'no' in option.lower(): 676 | choice = option 677 | if choice == "": 678 | self.record_unprepared_question(text_field_type, question_text) 679 | self.select_dropdown(dropdown_field, choice) 680 | 681 | elif 'assessment' in question_text: 682 | answer = self.get_answer('assessment') 683 | choice = "" 684 | for option in options: 685 | if answer == 'yes': 686 | choice = option 687 | else: 688 | if 'no' in option.lower(): 689 | choice = option 690 | # if choice == "": 691 | # choice = options[len(options) - 1] 692 | self.select_dropdown(dropdown_field, choice) 693 | 694 | elif 'commut' in question_text or 'on-site' in question_text or 'hybrid' in question_text or 'onsite' in question_text: 695 | answer = self.get_answer('commute') 696 | 697 | choice = "" 698 | for option in options: 699 | if answer == 'yes': 700 | choice = option 701 | else: 702 | if 'no' in option.lower(): 703 | choice = option 704 | # if choice == "": 705 | # choice = options[len(options) - 1] 706 | self.select_dropdown(dropdown_field, choice) 707 | 708 | elif 'country code' in question_text: 709 | self.select_dropdown(dropdown_field, self.personal_info['Phone Country Code']) 710 | 711 | elif 'north korea' in question_text: 712 | choice = "" 713 | for option in options: 714 | if 'no' in option.lower(): 715 | choice = option 716 | if choice == "": 717 | choice = options[len(options) - 1] 718 | self.select_dropdown(dropdown_field, choice) 719 | 720 | elif 'previously employed' in question_text or 'previous employment' in question_text: 721 | choice = "" 722 | for option in options: 723 | if 'no' in option.lower(): 724 | choice = option 725 | if choice == "": 726 | choice = options[len(options) - 1] 727 | self.select_dropdown(dropdown_field, choice) 728 | 729 | elif 'sponsor' in question_text: 730 | answer = self.get_answer('requireVisa') 731 | choice = "" 732 | for option in options: 733 | if answer == 'yes': 734 | choice = option 735 | else: 736 | if 'no' in option.lower(): 737 | choice = option 738 | if choice == "": 739 | choice = options[len(options) - 1] 740 | self.select_dropdown(dropdown_field, choice) 741 | 742 | elif 'above 18' in question_text.lower(): # Check for "above 18" in the question text 743 | choice = "" 744 | for option in options: 745 | if 'yes' in option.lower(): # Select 'yes' option 746 | choice = option 747 | if choice == "": 748 | choice = options[0] # Default to the first option if 'yes' is not found 749 | self.select_dropdown(dropdown_field, choice) 750 | 751 | elif 'currently living' in question_text or 'currently reside' in question_text: 752 | answer = self.get_answer('residency') 753 | choice = "" 754 | for option in options: 755 | if answer == 'yes': 756 | choice = option 757 | else: 758 | if 'no' in option.lower(): 759 | choice = option 760 | if choice == "": 761 | choice = options[len(options) - 1] 762 | self.select_dropdown(dropdown_field, choice) 763 | 764 | elif 'authorized' in question_text or 'authorised' in question_text: 765 | answer = self.get_answer('legallyAuthorized') 766 | choice = "" 767 | for option in options: 768 | if answer == 'yes': 769 | # find some common words 770 | choice = option 771 | else: 772 | if 'no' in option.lower(): 773 | choice = option 774 | if choice == "": 775 | choice = options[len(options) - 1] 776 | self.select_dropdown(dropdown_field, choice) 777 | 778 | elif 'citizenship' in question_text: 779 | answer = self.get_answer('legallyAuthorized') 780 | choice = "" 781 | for option in options: 782 | if answer == 'yes': 783 | if 'no' in option.lower(): 784 | choice = option 785 | if choice == "": 786 | choice = options[len(options) - 1] 787 | self.select_dropdown(dropdown_field, choice) 788 | 789 | elif 'clearance' in question_text: 790 | answer = self.get_answer('clearance') 791 | choice = "" 792 | for option in options: 793 | if answer == 'yes': 794 | choice = option 795 | else: 796 | if 'no' in option.lower(): 797 | choice = option 798 | if choice == "": 799 | choice = options[len(options) - 1] 800 | 801 | self.select_dropdown(dropdown_field, choice) 802 | 803 | elif any(keyword in question_text.lower() for keyword in 804 | [ 805 | 'aboriginal', 'native', 'indigenous', 'tribe', 'first nations', 806 | 'native american', 'native hawaiian', 'inuit', 'metis', 'maori', 807 | 'aborigine', 'ancestral', 'native peoples', 'original people', 808 | 'first people', 'gender', 'race', 'disability', 'latino' 809 | ]): 810 | negative_keywords = ['prefer', 'decline', 'don\'t', 'specified', 'none'] 811 | 812 | choice = "" 813 | choice = next((option for options in option.lower() if 814 | any(neg_keyword in option.lower() for neg_keyword in negative_keywords)), None) 815 | 816 | self.select_dropdown(dropdown_field, choice) 817 | 818 | elif 'email' in question_text: 819 | continue # assume email address is filled in properly by default 820 | 821 | elif 'experience' in question_text or 'understanding' in question_text or 'familiar' in question_text or 'comfortable' in question_text or 'able to' in question_text: 822 | answer = 'no' 823 | for experience in self.experience: 824 | if experience.lower() in question_text and self.experience[experience] > 0: 825 | answer = 'yes' 826 | break 827 | if answer == 'no': 828 | # record unlisted experience as unprepared questions 829 | self.record_unprepared_question("dropdown", question_text) 830 | 831 | choice = "" 832 | for option in options: 833 | if answer in option.lower(): 834 | choice = option 835 | if choice == "": 836 | choice = options[len(options) - 1] 837 | self.select_dropdown(dropdown_field, choice) 838 | 839 | else: 840 | choice = "" 841 | for option in options: 842 | if 'yes' in option.lower(): 843 | choice = option 844 | if choice == "": 845 | choice = options[len(options) - 1] 846 | self.select_dropdown(dropdown_field, choice) 847 | self.record_unprepared_question("dropdown", question_text) 848 | continue 849 | except: 850 | print("An exception occurred while filling up dropdown field") # TODO: Put logging behind debug flag 851 | 852 | # Checkbox check for agreeing to terms and service 853 | try: 854 | clickable_checkbox = question.find_element(By.TAG_NAME, 'label') 855 | clickable_checkbox.click() 856 | except: 857 | print("An exception occurred while filling up checkbox field") # TODO: Put logging behind debug flag 858 | 859 | def unfollow(self): 860 | try: 861 | follow_checkbox = self.browser.find_element(By.XPATH, 862 | "//label[contains(.,\'to stay up to date with their page.\')]").click() 863 | follow_checkbox.click() 864 | except: 865 | pass 866 | 867 | def send_resume(self): 868 | print("Trying to send resume") 869 | try: 870 | file_upload_elements = (By.CSS_SELECTOR, "input[name='file']") 871 | if len(self.browser.find_elements(file_upload_elements[0], file_upload_elements[1])) > 0: 872 | input_buttons = self.browser.find_elements(file_upload_elements[0], file_upload_elements[1]) 873 | if len(input_buttons) == 0: 874 | raise Exception("No input elements found in element") 875 | for upload_button in input_buttons: 876 | upload_type = upload_button.find_element(By.XPATH, "..").find_element(By.XPATH, 877 | "preceding-sibling::*") 878 | if 'resume' in upload_type.text.lower(): 879 | upload_button.send_keys(self.resume_dir) 880 | elif 'cover' in upload_type.text.lower(): 881 | if self.cover_letter_dir != '': 882 | upload_button.send_keys(self.cover_letter_dir) 883 | elif 'required' in upload_type.text.lower(): 884 | upload_button.send_keys(self.resume_dir) 885 | except: 886 | print("Failed to upload resume or cover letter!") 887 | pass 888 | 889 | def enter_text(self, element, text): 890 | element.clear() 891 | element.send_keys(text) 892 | 893 | def select_dropdown(self, element, text): 894 | select = Select(element) 895 | select.select_by_visible_text(text) 896 | 897 | # Radio Select 898 | def radio_select(self, element, label_text, clickLast=False): 899 | label = element.find_element(By.TAG_NAME, 'label') 900 | if label_text in label.text.lower() or clickLast == True: 901 | label.click() 902 | 903 | # Contact info fill-up 904 | def contact_info(self, form): 905 | print("Trying to fill up contact info fields") 906 | frm_el = form.find_elements(By.TAG_NAME, 'label') 907 | if len(frm_el) > 0: 908 | for el in frm_el: 909 | text = el.text.lower() 910 | if 'email address' in text: 911 | continue 912 | elif 'phone number' in text: 913 | try: 914 | country_code_picker = el.find_element(By.XPATH, 915 | '//select[contains(@id,"phoneNumber")][contains(@id,"country")]') 916 | self.select_dropdown(country_code_picker, self.personal_info['Phone Country Code']) 917 | except Exception as e: 918 | print("Country code " + self.personal_info[ 919 | 'Phone Country Code'] + " not found. Please make sure it is same as in LinkedIn.") 920 | print(e) 921 | try: 922 | phone_number_field = el.find_element(By.XPATH, 923 | '//input[contains(@id,"phoneNumber")][contains(@id,"nationalNumber")]') 924 | self.enter_text(phone_number_field, self.personal_info['Mobile Phone Number']) 925 | except Exception as e: 926 | print("Could not enter phone number:") 927 | print(e) 928 | 929 | def fill_up(self): 930 | try: 931 | easy_apply_modal_content = self.browser.find_element(By.CLASS_NAME, "jobs-easy-apply-modal__content") 932 | form = easy_apply_modal_content.find_element(By.TAG_NAME, 'form') 933 | try: 934 | label = form.find_element(By.TAG_NAME, 'h3').text.lower() 935 | if 'home address' in label: 936 | self.home_address(form) 937 | elif 'contact info' in label: 938 | self.contact_info(form) 939 | elif 'resume' in label: 940 | self.send_resume() 941 | else: 942 | self.additional_questions(form) 943 | except Exception as e: 944 | print("An exception occurred while filling up the form:") 945 | print(e) 946 | except: 947 | print("An exception occurred while searching for form in modal") 948 | 949 | def write_to_file(self, company, job_title, link, location, search_location): 950 | to_write = [company, job_title, link, location, search_location, datetime.now()] 951 | file_path = self.file_name + ".csv" 952 | print(f'updated {file_path}.') 953 | 954 | with open(file_path, 'a', newline='', encoding='utf-8') as f: 955 | writer = csv.writer(f) 956 | writer.writerow(to_write) 957 | 958 | def record_unprepared_question(self, answer_type, question_text): 959 | to_write = [answer_type, question_text] 960 | file_path = self.unprepared_questions_file_name + ".csv" 961 | 962 | try: 963 | with open(file_path, 'a') as f: 964 | writer = csv.writer(f) 965 | writer.writerow(to_write) 966 | print(f'Updated {file_path} with {to_write}.') 967 | except: 968 | print( 969 | "Special characters in questions are not allowed. Failed to update unprepared questions log.") 970 | print(question_text) 971 | 972 | def scroll_slow(self, scrollable_element, start=0, end=3600, step=100, reverse=False): 973 | if reverse: 974 | start, end = end, start 975 | step = -step 976 | 977 | for i in range(start, end, step): 978 | self.browser.execute_script("arguments[0].scrollTo(0, {})".format(i), scrollable_element) 979 | time.sleep(random.uniform(1.0, 2.6)) 980 | 981 | def avoid_lock(self): 982 | if self.disable_lock: 983 | return 984 | 985 | pyautogui.keyDown('ctrl') 986 | pyautogui.press('esc') 987 | pyautogui.keyUp('ctrl') 988 | time.sleep(1.0) 989 | pyautogui.press('esc') 990 | 991 | def get_base_search_url(self, parameters): 992 | remote_url = "" 993 | lessthanTenApplicants_url = "" 994 | 995 | if parameters.get('remote'): 996 | remote_url = "&f_WT=2" 997 | else: 998 | remote_url = "" 999 | # TO DO: Others &f_WT= options { WT=1 onsite, WT=2 remote, WT=3 hybrid, f_WT=1%2C2%2C3 } 1000 | 1001 | if parameters['lessthanTenApplicants']: 1002 | lessthanTenApplicants_url = "&f_EA=true" 1003 | 1004 | level = 1 1005 | experience_level = parameters.get('experienceLevel', []) 1006 | experience_url = "f_E=" 1007 | for key in experience_level.keys(): 1008 | if experience_level[key]: 1009 | experience_url += "%2C" + str(level) 1010 | level += 1 1011 | 1012 | distance_url = "?distance=" + str(parameters['distance']) 1013 | 1014 | job_types_url = "f_JT=" 1015 | job_types = parameters.get('jobTypes', []) 1016 | # job_types = parameters.get('experienceLevel', []) 1017 | for key in job_types: 1018 | if job_types[key]: 1019 | job_types_url += "%2C" + key[0].upper() 1020 | 1021 | date_url = "" 1022 | dates = {"all time": "", "month": "&f_TPR=r2592000", "week": "&f_TPR=r604800", "24 hours": "&f_TPR=r86400"} 1023 | date_table = parameters.get('date', []) 1024 | for key in date_table.keys(): 1025 | if date_table[key]: 1026 | date_url = dates[key] 1027 | break 1028 | 1029 | easy_apply_url = "&f_AL=true" 1030 | 1031 | extra_search_terms = [distance_url, remote_url, lessthanTenApplicants_url, job_types_url, experience_url] 1032 | extra_search_terms_str = '&'.join( 1033 | term for term in extra_search_terms if len(term) > 0) + easy_apply_url + date_url 1034 | 1035 | return extra_search_terms_str 1036 | 1037 | def next_job_page(self, position, location, job_page): 1038 | self.browser.get("https://www.linkedin.com/jobs/search/" + self.base_search_url + 1039 | "&keywords=" + position + location + "&start=" + str(job_page * 25)) 1040 | 1041 | self.avoid_lock() 1042 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | import yaml, os 2 | from selenium import webdriver 3 | from selenium.webdriver.chrome.options import Options 4 | from selenium.webdriver.chrome.service import Service 5 | from validate_email import validate_email 6 | from webdriver_manager.chrome import ChromeDriverManager 7 | from linkedineasyapply import LinkedinEasyApply 8 | 9 | def init_browser(): 10 | browser_options = Options() 11 | options = [ 12 | '--disable-blink-features', 13 | '--no-sandbox', 14 | '--start-maximized', 15 | '--disable-extensions', 16 | '--ignore-certificate-errors', 17 | '--disable-blink-features=AutomationControlled', 18 | '--remote-debugging-port=9222' 19 | ] 20 | 21 | # Restore session if possible (avoids login everytime) 22 | user_data_dir = os.path.join(os.getcwd(), "chrome_bot") 23 | browser_options.add_argument(f"user-data-dir={user_data_dir}") 24 | 25 | for option in options: 26 | browser_options.add_argument(option) 27 | 28 | service = Service(ChromeDriverManager().install()) 29 | driver = webdriver.Chrome(service=service, options=browser_options) 30 | driver.implicitly_wait(1) # Wait time in seconds to allow loading of elements 31 | driver.set_window_position(0, 0) 32 | driver.maximize_window() 33 | return driver 34 | 35 | def validate_yaml(): 36 | with open("config.yaml", 'r', encoding='utf-8') as stream: 37 | try: 38 | parameters = yaml.safe_load(stream) 39 | except yaml.YAMLError as exc: 40 | raise exc 41 | 42 | mandatory_params = ['email', 43 | 'password', 44 | 'disableAntiLock', 45 | 'remote', 46 | 'lessthanTenApplicants', 47 | 'experienceLevel', 48 | 'jobTypes', 49 | 'date', 50 | 'positions', 51 | 'locations', 52 | 'residentStatus', 53 | 'distance', 54 | 'outputFileDirectory', 55 | 'checkboxes', 56 | 'universityGpa', 57 | 'languages', 58 | 'experience', 59 | 'personalInfo', 60 | 'eeo', 61 | 'uploads'] 62 | 63 | for mandatory_param in mandatory_params: 64 | if mandatory_param not in parameters: 65 | raise Exception(mandatory_param + ' is not defined in the config.yaml file!') 66 | 67 | assert validate_email(parameters['email']) 68 | assert len(str(parameters['password'])) > 0 69 | assert isinstance(parameters['disableAntiLock'], bool) 70 | assert isinstance(parameters['remote'], bool) 71 | assert isinstance(parameters['lessthanTenApplicants'], bool) 72 | assert isinstance(parameters['residentStatus'], bool) 73 | assert len(parameters['experienceLevel']) > 0 74 | experience_level = parameters.get('experienceLevel', []) 75 | at_least_one_experience = False 76 | 77 | for key in experience_level.keys(): 78 | if experience_level[key]: 79 | at_least_one_experience = True 80 | assert at_least_one_experience 81 | 82 | assert len(parameters['jobTypes']) > 0 83 | job_types = parameters.get('jobTypes', []) 84 | at_least_one_job_type = False 85 | for key in job_types.keys(): 86 | if job_types[key]: 87 | at_least_one_job_type = True 88 | 89 | assert at_least_one_job_type 90 | assert len(parameters['date']) > 0 91 | date = parameters.get('date', []) 92 | at_least_one_date = False 93 | 94 | for key in date.keys(): 95 | if date[key]: 96 | at_least_one_date = True 97 | assert at_least_one_date 98 | 99 | approved_distances = {0, 5, 10, 25, 50, 100} 100 | assert parameters['distance'] in approved_distances 101 | assert len(parameters['positions']) > 0 102 | assert len(parameters['locations']) > 0 103 | assert len(parameters['uploads']) >= 1 and 'resume' in parameters['uploads'] 104 | assert len(parameters['checkboxes']) > 0 105 | 106 | checkboxes = parameters.get('checkboxes', []) 107 | assert isinstance(checkboxes['driversLicence'], bool) 108 | assert isinstance(checkboxes['requireVisa'], bool) 109 | assert isinstance(checkboxes['legallyAuthorized'], bool) 110 | assert isinstance(checkboxes['certifiedProfessional'], bool) 111 | assert isinstance(checkboxes['urgentFill'], bool) 112 | assert isinstance(checkboxes['commute'], bool) 113 | assert isinstance(checkboxes['backgroundCheck'], bool) 114 | assert isinstance(checkboxes['securityClearance'], bool) 115 | assert 'degreeCompleted' in checkboxes 116 | assert isinstance(parameters['universityGpa'], (int, float)) 117 | 118 | languages = parameters.get('languages', []) 119 | language_types = {'none', 'conversational', 'professional', 'native or bilingual'} 120 | for language in languages: 121 | assert languages[language].lower() in language_types 122 | 123 | experience = parameters.get('experience', []) 124 | for tech in experience: 125 | assert isinstance(experience[tech], int) 126 | assert 'default' in experience 127 | 128 | assert len(parameters['personalInfo']) 129 | personal_info = parameters.get('personalInfo', []) 130 | for info in personal_info: 131 | assert personal_info[info] != '' 132 | 133 | assert len(parameters['eeo']) 134 | eeo = parameters.get('eeo', []) 135 | for survey_question in eeo: 136 | assert eeo[survey_question] != '' 137 | 138 | return parameters 139 | 140 | if __name__ == '__main__': 141 | parameters = validate_yaml() 142 | browser = init_browser() 143 | 144 | bot = LinkedinEasyApply(parameters, browser) 145 | bot.login() 146 | bot.security_check() 147 | bot.start_applying() -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | selenium 2 | pyautogui 3 | webdriver_manager 4 | PyYAML 5 | validate_email --------------------------------------------------------------------------------