Skip to main content

Log into and download reports from ADP Resource and ezLaborManager.

Project description

A Selenium-based python script for logging into ADP Resource and downloading reports.

Usage

Installation

With Python 3.6 or greater installed, in a command prompt: enter pip install adp-webscrape. You’ll also need a recent edition of Firefox and its respective GeckoDriver. The GeckoDriver must be added to PATH, or to the root folder of the project.

Code

Use the following code, replacing my_username, my_password, my_download_path, and my_isi_client_id with relevant information.

  • my_username: Your ADP Resource username

  • my_password: Your ADP Resource password

  • my_download_path: (optional) The path that Selenium’s browser will download reports to (e.g C:\adp-reports). Ommiting defaults to the user’s download folder.

  • my_isi_client_id: This can be found at the end of the url for any ezLaborManager page. Most likely, it’s going to be your company name (probably spaced out by hyphens if the name is multiple words).

  • my_report_index: On the ezLaborManager “My Reports” page, this will be the index of the report you want to download (with the first report starting at index 0) https://i.imgur.com/Tg7kPQV.png

  • my_file_prefix: (optional) If you’d like to prefix the name of your files with some word so as to not mix report names, you may do so here.

import atexit
from adpwebscrape import ADPResource


resource = ADPResource('my_username', 'my_password',
                           isi_client_id='my_isi_client_id',
                           download_path=r'my_download_path')

resource.download_my_report(my_report_index, prefix='my_file_prefix') #returns Filename

atexit.register(resource.quit)

Other

Why no official API?

There isn’t one. ADP Marketplace has an API, though it is very separate from the reports I’ve attempted to generate here.

Why Selenium and not regular schmegular requests?

Requests to ADP Resource require hidden fields whose contents seem like a pain to generate programatically. Selenium was chosen because it handles all of that at the cost of a little performance. Please let me know if you find a better way to do this.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adp-webscrape-0.1.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

adp_webscrape-0.1.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file adp-webscrape-0.1.0.tar.gz.

File metadata

  • Download URL: adp-webscrape-0.1.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.11 CPython/3.7.2 Windows/10

File hashes

Hashes for adp-webscrape-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4d2307b50b254594a7833442641559d6d63730e37f3c7e06e70c9377119373df
MD5 4a58dbeec2da9a6393da4d12c9d2ff73
BLAKE2b-256 1f407f4e717cd629d9e7799a76a498fd042eef1fa205bb63369fb0ff02fbf555

See more details on using hashes here.

File details

Details for the file adp_webscrape-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: adp_webscrape-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.11 CPython/3.7.2 Windows/10

File hashes

Hashes for adp_webscrape-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2fba881ecd4a358e2b61f8879a577c0743b4f1c59b8f8a9d517cdbf8020b8432
MD5 e8d924ef282a4fadbbf44951f16fbba8
BLAKE2b-256 c6fa4f8b4a41afb46bed9b582d158b68cd16272fb2039cc9de935aa5e9ec905c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page