hvdb Registration Monitoring

📢 This article was translated by gemini-3-flash-preview

I’ve been into ASMR and doujin voice works since… well, I don’t remember exactly when. High prices naturally drive me to search the vast internet, which led me to this site. However, the site only shows full content to logged-in users, and registration is almost never open except at random intervals. This made me curious.

So, I decided to run a program on my server to monitor if registration is open and notify me when it is.

GitHub: yexca/hvdb

Goal

Monitor whether registration is open and send a notification via Telegram if it is.

Detecting Registration

According to a reply in a thread on Reimu Plaza, when registration is open, a “register” link appears below the login button.

The simplest approach is to scrape the page and check for the presence of that word.

Bot Configuration

To use Telegram notifications, you need to register a bot.

Message https://t.me/BotFather and send the /newbot command. Follow the steps to create your bot.

Send a hello to your newly created bot.

Then visit the following URL (replace TOKEN with your actual token):

1
https://api.telegram.org/botTOKEN/getUpdates

You will get a JSON response. Find the id field; this is your chat_id.


Reference: Using Telegram Bot for Push Notifications


Python

Using Python is the easiest way (I didn’t bother looking into other languages).

I’m using the Requests library for scraping and pyTelegramBotAPI for notifications.

I won’t over-explain the logic; here is the code (do not name this file http.py or requests.py).

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import telebot
import requests
import time

# Replace with your token
bot = telebot.TeleBot("TOKEN", parse_mode="MARKDOWN") # You can set parse_mode by default. HTML or MARKDOWN

def inform():
    web = requests.get("https://hvdb.me/")
    str = web.text
    a = str.find("register")

    if a != -1:
        # Replace with your chat_id
        bot.send_message("chat_id", "[hvdb](http://hvdb.me/) register start")
        
t = 0

while True:
    inform()
    # Run once per hour
    time.sleep(3600)
    # Counter for 24-hour heartbeat
    t += 1
    # Send a daily notification to confirm the script is running
    if t == 24:
        t -= 24
        local_time = time.ctime(time.time())
        inform_str = "{} script is running".format(local_time)
        # Replace with your chat_id
        bot.send_message("chat_id", inform_str)

References:

Solution for “AttributeError: partially initialized module ‘requests’ has no attribute ‘get’”

requests - Liao Xuefeng’s Official Website

Python time sleep() method - Runoob

Python Date and Time - Runoob


Dockerizing

File structure:

1
2
3
D:\DOCKER\HVDB
    Dockerfile
    inform.py

Dockerfile:

1
2
3
4
5
6
FROM python:3.11-alpine
RUN pip install requests \
    && pip install pyTelegramBotAPI

COPY ./inform.py /app/inform.py
CMD [ "python", "/app/inform.py" ]

Run the build command in the same directory:

1
docker build -t hvdb:v1.0 .

Moving to Server

On Windows:

1
docker save -o hvdb.tar hvdb:v1.0

Wait for the packaging to finish, then copy it to the server:

1
scp .\hvdb.tar username@hostname:/path

Once copied, run on the server:

1
docker load -i hvdb.tar

Reference: docker load error: Error processing tar file(exit status 1): archive/tar: invalid tar header


This post is licensed under CC BY-NC-SA 4.0 by the author.
Last updated on 2025-09-30 01:25 +0900