This script allows you to fetch all your payslips, P60 and P11D forms from rsmuk.com portal.
- Python 3.9+
- Selenium module (
pip install selenium
) - Chrome browser and Chrome WebDriver or Selenium Grid
- Clone the repository:
git clone https://github.com/loglux/allmypayslips.git
- Install the required dependencies:
pip install selenium
-
Download the Chrome WebDriver from the official website: Chrome WebDriver Downloads
-
Place the downloaded Chrome WebDriver executable in the project's directory.
Script reffers to the Windows version of the webdriver (webdriver.exe). Update it, if you use Mac or Linux.
Alternatively, to steps 3 and 4, you can use Selenium Grid instead of Webdriver; just update 'self.driver =' uncommenting and commenting out corresponding lines.
-
Open the
payslip_fetcher.py
script in a text editor. -
Replace the placeholders with your username and password in the
login
method:
payslip_fetcher.login('<replace-with-your-username>', '<replace-with-your-password>')
Save the changes.
Run the payslip_fetcher.py script:
python payslip_fetcher.py
By default, the PayslipFetcher script runs in headless mode, which means the Chrome browser runs in the background without a visible UI. If you want to disable headless mode and run the script with a visible browser window, you can comment out the following line in the PayslipFetcher
class:
# self.options.add_argument("--headless=new")
Ensure that the Chrome browser is installed and compatible with the Chrome WebDriver version. You can also use Selenium Grid by configuring the remote WebDriver URL in the script. All files are saved into a default directory (Downloads)