GithubHelp home page GithubHelp logo

automatic_directbook_h2s's Introduction

Holland2Stay Direct Booking Detector

Overview

This application continually checks for available "direct booking" properties on the Holland2Stay website, based on your personal preferences. If a property matching your criteria becomes available, the program instantly notifies you via Telegram.

Setup Instructions

Prerequisites

  • Basic coding abilities
  • A Python-execution platform (I recommend PythonAnywhere by Anaconda. Note: A subscription to the 6 EUR plan is required for cloud execution)
  • A Telegram account

Setup Steps

  1. Open Telegram, search for @BotFather, and send the "/start" message.
  2. Start a new bot by sending "/newbot" and follow the on-screen instructions to set a bot name and username.
  3. After setting up your bot, make a note of the provided token (important for setup).
  4. Find your bot (using the username you've just created) in Telegram, then press the “Start” button or send a "/start" message.
  5. In a new browser tab, navigate to https://api.telegram.org/bot{yourtoken}/getUpdates, replacing {yourtoken} with your bot token, and hit enter.
  6. Locate the "id" - this is your chatID. Record this for later use.
  7. Open the auto_detect.py file in an editor (like VS Code).
  8. Customize the script:
    • On line 80, replace TOKEN with your Telegram bot token.
    • On line 81, replace your_chat_id with your Telegram chat ID (include the quotes, like "1234567890").
    • On line 86, set the budget parameter to your maximum preferred price.
    • On line 87, fill the cities parameter with a list of cities you're interested in (e.g., ["Amsterdam", "Delft"]).
  9. Set up and run the Python file on PythonAnywhere to execute it continuously (note: this requires a subscription). Alternatively, you can directly run the program on your device, but ensure it remains active during your absence.
    • Go to Files tab, upload the file auto_detect_py
    • Go to Tasks tab, create an Always-on Task with command python3.10 /home/{username}/auto_detect.py by replacing {username} to your username
  10. As soon as properties matching your criteria are available, you will receive a message on Telegram.

Advanced Settings

  • The program is currently configured to check the website every 12 seconds. To change this interval, modify the values on lines 92 and 94 (time is in seconds). Remember to execute responsively, and note that faster scraping can consume more resources if running in the cloud.
  • The program also waits 2 minutes between each message to avoid excessive notifications. You can adjust this interval on line 39.

For any inquiries, feel free to contact me at [email protected].

automatic_directbook_h2s's People

Contributors

xuyou1999 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.