Skip to content

Sjeff/politie-malafide-blocklist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚨 Politie Malafide Blocklist

Automatically updated DNS blocklist of fraudulent webshops and merchants Based on the official list published by the Dutch National Police.


Update Format Source Built with Claude


📖 What does this project do?

The Dutch National Police publishes a public list of webshops and merchants flagged as fraudulent. This project scrapes that list daily via GitHub Actions and converts it into a DNS blocklist ready for use in AdGuard Home, Pi-hole, NextDNS, and other DNS-level filters.

politie.nl → Python scraper → GitHub Actions (06:00 UTC) → GitHub Gist → your DNS filter

⚡ Usage

🛡️ AdGuard Home / AdGuard DNS

Add the following URL as a custom blocklist:

https://gist.githubusercontent.com/Sjeff/b215b0c5e12c6d5ac725f618e2111c32/raw/politie-malafide-blocklist.txt

Steps:

  1. Open AdGuard Home → FiltersDNS Blocklists
  2. Click Add Blocklist
  3. Paste the URL above
  4. Save and restart if prompted

🕳️ Pi-hole

  1. Go to SettingsAdlists
  2. Add the URL
  3. Click Update Gravity

🌐 NextDNS / uBlock Origin

The list uses the Adblock Plus format (||domain.nl^) and is compatible with all common DNS-level blockers.


🔄 Automatic updates

Property Value
Frequency Every day
Time 06:00 UTC
Lag after change on politie.nl ≤ 24 hours
Manual trigger Available via the Actions tab
Change detection Gist is only updated when new entries are detected

The GitHub Actions workflow runs on ubuntu-latest with Python 3.10 and automatically installs the required dependencies (requests, beautifulsoup4). Unit tests run before each scrape — if a test fails, the Gist is not updated.


🗂️ Project structure

politie-malafide-blocklist/
├── .github/
│   └── workflows/
│       └── update-blocklist.yml   # GitHub Actions workflow (daily, 06:00 UTC)
├── update_blocklist.py            # Scraper + Gist updater
├── test_update_blocklist.py       # Unit tests (domain validation, blocklist format)
└── readme.md

🔧 Self-hosting

Required repository secrets

Secret Description
GIST_TOKEN GitHub Personal Access Token with gist scope
GIST_ID ID of the target Gist (leave empty on first run — created automatically)

First run

  1. Fork this repository
  2. Create a GitHub Personal Access Token with the gist scope
  3. Add GIST_TOKEN as a repository secret
  4. Leave GIST_ID empty on first run — the script will create a new Gist and print its ID
  5. Add the printed GIST_ID as a repository secret
  6. Subsequent runs will only update the Gist when changes are detected

📋 Blocklist format

The generated blocklist follows the Adblock Plus 2.0 format:

[Adblock Plus 2.0]
! Title: Politie.nl Malafide Handelspartijen
! Description: Blokkeerlijst van malafide webshops volgens politie.nl
! Homepage: https://www.politie.nl/...
! Total entries: <count>
!
||fraudulent-shop.nl^
||scammer.com^
...

🧪 Development

Running tests locally

pip install requests beautifulsoup4 pytest
pytest test_update_blocklist.py -v

Tests cover domain validation logic and blocklist content formatting. No network calls are made during tests.


⚠️ Source and disclaimer

All data is sourced from politie.nl. This project is not affiliated with or endorsed by the Dutch National Police.

The list is generated automatically from public government data. Always verify the trustworthiness of a webshop independently before making a purchase.


🤖 Built with Claude AI

Claude AI

This project was built in collaboration with Claude by Anthropic. Claude assisted with the scraper design, GitHub Actions workflow, Gist integration, and this documentation.


📄 License

Data is sourced from a public government source. The code and automation are free to use.

Releases

No releases published

Packages

 
 
 

Contributors

Languages