Watch a URL for new comments and likes with cross-platform desktop notifications.
Project description
HN-Watch
HN-Watch is a small cross-platform CLI that watches a Hacker News item page and alerts you when the post gets new comments or more points.
It is built with:
- Python
requestsBeautifulSoup
It works on:
- Linux
- macOS
- Windows
What It Watches
HN-Watch only supports Hacker News item pages:
https://news.ycombinator.com/item?id=12345
It checks:
- comment count
- point count
If either number goes up, HN-Watch prints an alert in the terminal and sends a desktop notification.
How Notifications Work
HN-Watch uses platform-specific notifications:
- Linux:
notify-send - macOS:
terminal-notifierif installed, otherwiseosascript - Windows: PowerShell WinForms message box
The tool always also prints alerts in the terminal, so it still works even if desktop notifications are unavailable.
Install
The easiest install path for most users is pipx.
Linux
python3 -m pip install --user pipx
python3 -m pipx ensurepath
pipx install hn-watch
Optional desktop notification dependency:
sudo apt install libnotify-bin
macOS
brew install pipx
pipx ensurepath
pipx install hn-watch
Optional preferred notification tool:
brew install terminal-notifier
Windows
py -m pip install --user pipx
py -m pipx ensurepath
pipx install hn-watch
Usage
Pass the Hacker News item URL with --url:
hn-watch --url "https://news.ycombinator.com/item?id=47779274"
Or run it with no URL and it will prompt for one:
hn-watch
Useful options:
hn-watch --url "https://news.ycombinator.com/item?id=47779274" --interval 60
hn-watch --url "https://news.ycombinator.com/item?id=47779274" --timeout 15
hn-watch --url "https://news.ycombinator.com/item?id=47779274" --show-unchanged
Example Output
Watching https://news.ycombinator.com/item?id=47779274
Polling every 60 seconds
Baseline: Making Wax Sealed Letters at Scale | Hacker News | comments=3 | points=1
[ALERT] HN-Watch Alert: Comments: 3 -> 4 (+1)
How It Works
- HN-Watch fetches the Hacker News item page with
requests. - It parses the HTML with
BeautifulSoup. - It reads the post's current point count and comment count from the page.
- It sleeps for the configured interval.
- It fetches the page again and compares the new counts to the previous snapshot.
- If points or comments increased, it sends a notification.
Important Notes
- HN-Watch is intentionally limited to Hacker News item pages.
- It does not watch the HN front page, user pages, or external sites.
- It tracks increases in points and comments only.
- A URL with an anchor is fine. HN-Watch ignores the
#...fragment and watches the underlying item page.
Help
See the built-in CLI help:
hn-watch --help
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hn_watch-0.1.0.tar.gz.
File metadata
- Download URL: hn_watch-0.1.0.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28be62d6ffc227f4f8c4f75e354fefd80747434ceda24c55bf910f0497bbe698
|
|
| MD5 |
4054a7a9bc4cb1543932a5fb29261412
|
|
| BLAKE2b-256 |
041373b6fab6be8c70f7a5c8f3f4385850a39d8f12954fb20136734c77a782da
|
Provenance
The following attestation bundles were made for hn_watch-0.1.0.tar.gz:
Publisher:
publish.yml on hayden3456/hn-watch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hn_watch-0.1.0.tar.gz -
Subject digest:
28be62d6ffc227f4f8c4f75e354fefd80747434ceda24c55bf910f0497bbe698 - Sigstore transparency entry: 1310024723
- Sigstore integration time:
-
Permalink:
hayden3456/hn-watch@d3732fe860e3fbd43b0aab3a562c6eaa928ab957 -
Branch / Tag:
refs/tags/V0.1 - Owner: https://github.com/hayden3456
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d3732fe860e3fbd43b0aab3a562c6eaa928ab957 -
Trigger Event:
release
-
Statement type:
File details
Details for the file hn_watch-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hn_watch-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fef624d1fd28d53024f1b19bbc66ae1c493cdeb1090e865b621a61cad0296bbe
|
|
| MD5 |
230b71aa36f11616b01187e256abfcf5
|
|
| BLAKE2b-256 |
682eaacf180406d09ef4a2b4f7d39a0feae083f2ba4282c2289cd3b45a82b059
|
Provenance
The following attestation bundles were made for hn_watch-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on hayden3456/hn-watch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hn_watch-0.1.0-py3-none-any.whl -
Subject digest:
fef624d1fd28d53024f1b19bbc66ae1c493cdeb1090e865b621a61cad0296bbe - Sigstore transparency entry: 1310024793
- Sigstore integration time:
-
Permalink:
hayden3456/hn-watch@d3732fe860e3fbd43b0aab3a562c6eaa928ab957 -
Branch / Tag:
refs/tags/V0.1 - Owner: https://github.com/hayden3456
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d3732fe860e3fbd43b0aab3a562c6eaa928ab957 -
Trigger Event:
release
-
Statement type: