Skip to main content

WebNotifier

PyPI PyPI - Python Version PyPI - Status PyPI - License

Webnotifier is a simple package for notifying any webpage change.

Requirements

This package needs:

  • Requests >= 2.21.0
  • lxml >= 4.3.3

Installation

To install Webnotifier, use pip

$ pip install webnotifier

Usage

Instanciate the WebNotifier class and pass an url array and two callbacks. Also, you can pass the interval time (in seconds).

from webnotifier import WebNotifier

my_urls = [{'name':'Google','href':'https://www.google.com'}, {'name':'Medium','href':'https://medium.com'},{'name':'Localhost','href':'http://127.0.0.1:3000'}]

def onError(err):
    """
    URL and Name params can be accessed within err.name && err.url
    """
    print("There was an error with {} on {}".format(err.name, err.url))

def onNewChange(url,name):
    print("Webpage {} on {} changed!".format(name,url))

interval = 60 #Check if webpage changes every 60 seconds

custom_webnotifier = WebNotifier(my_urls,onNewChange,onError,interval)
custom_webnotifier.start()

When a webpage changes, the onNewChange callback will be triggered. Otherwise, if there's any error in getting the URL, onError callback will be executed.

Release files for webnotifier 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for webnotifier 0.1.1
File Size Uploaded
webnotifier-0.1.1.tar.gz 2.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for webnotifier 0.1.1
File Interpreter ABI Platform
webnotifier-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size:7.1 kB

Release files / webnotifier-0.1.1.tar.gz

Download URL webnotifier-0.1.1.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a564f200ccc6d4646aea677fde434717cb5fa231d96d033ab0283b7dcbaf678c
BLAKE2b-256 checksum
How to use checksums
04fe49f9e1b07fba5696fae392ead762c185bc4fb36d9daa7f9165b5a599b04e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Release files / webnotifier-0.1.1-py3-none-any.whl

Download URL webnotifier-0.1.1-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f84897bfe71012e36864f874dda0a416011389ed2450b3d1ef8151a8a3c74cf8
BLAKE2b-256 checksum
How to use checksums
7bd24d77b30dfe00391260914af7e36dc16a4184d3328769e2fd7f8440f0c365
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page