Python script that scrapes the internal web pages of HP Printers for data.
Prerequisites:
- Python installed on your machine : https://www.python.org/downloads/
- Requires the Pandas and BeautifulSoup library to be installed.
- Pandas can be installed by running pip install pandas from command prompt or terminal window.
- BeautifulSoup can be installed by running pip install beautifulsoup4 from a command prompt or terminal window.
- This script requires that you disable Encrypt All Web Communication (not including IPP) on the printer. This can be done from the internal webpage under the Networking Tab >> Mgmt. Protocals.
- This allows the script to request the webpage, otherwise the script would fail to reach the webpage.
Do this at your own risk as you are disabling a security feature on your printer
What the script does: This script specifically scrapes the internal webpages of HP printers (that are defined in the script) and pulls the following info: - The Date - Printer Name (as defined) - Page Count - Toner Level - Maintenance Kit Level
The script will look for a .xlsx file named (AllPrinters.xlsx). If if doesn't find the .xlsx, it will create one in the directory in which you run the script from. The script will append the data everytime it is executed.