👨‍🏫 Tutorial Hotel101 Notifier Script 24/7 active Free. ( updated working na po ito)

Nagsend naman sa bot ko agad
Screenshot_2024-10-08-16-43-57-302_org.telegram.messenger.webp


Pinaltan ko lang yung message txt HAHAHA
 
eto nalang gamitin mo lods gamit ko

HTML:
import requests
import time
import logging
import json

API_URL = "https://hotel101app.com/api/auth/login"
TELEGRAM_BOT_TOKEN = "YOUR_TELEGRAM_BOT_TOKEN"
CHAT_ID = "YOUR_CHAT_ID"
AVAILABLE_CHECK_INTERVAL = 20
UNAVAILABLE_CHECK_INTERVAL = 300

logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
logger = logging.getLogger(__name__)

def check_registration():
    try:
        time.sleep(1)  # Add a small delay
        response = requests.get(API_URL)
        logger.info(f"API response status code: {response.status_code}")
        logger.info(f"API response content: {response.text[:200]}")  # Log first 200 characters of response

        if response.status_code == 200:
            try:
                json_response = response.json()
                # Check if 'message' key exists and its value indicates availability
                if 'message' in json_response and json_response['message'] != 'Registration is closed':
                    return True
            except json.JSONDecodeError:
                logger.error("Failed to parse JSON response")
       
        return False
    except requests.RequestException as e:
        logger.error(f"Error checking registration: {e}")
        return False

def send_telegram_message(message):
    url = f"https://api.telegram.org/bot{TELEGRAM_BOT_TOKEN}/sendMessage"
    params = {
        "chat_id": CHAT_ID,
        "text": message
    }
    try:
        response = requests.get(url, params=params)
        logger.info(f"Telegram API response: {response.status_code}")
        return response.status_code == 200
    except requests.RequestException as e:
        logger.error(f"Error sending Telegram message: {e}")
        return False

def main():
    logger.info("Starting registration checker...")
    last_status = None
    last_notification_time = 0

    while True:
        current_status = check_registration()
        current_time = time.time()
       
        if current_status:
            message = "The registration for hotel101app is currently available!"
            check_interval = AVAILABLE_CHECK_INTERVAL
        else:
            message = "The registration for hotel101app is currently unavailable."
            check_interval = UNAVAILABLE_CHECK_INTERVAL

        if current_status != last_status or (current_time - last_notification_time >= check_interval):
            logger.info(message)
            if send_telegram_message(message):
                logger.info("Notification sent successfully")
                last_notification_time = current_time
            else:
                logger.error("Failed to send notification")

        last_status = current_status
       
        time.sleep(check_interval)

if __name__ == "__main__":
    main()


You do not have permission to view the full content of this post. Log in or register now.
paste mo yan lods sa browser mo palitan mo yung bot token ng telegram bot mo
try ko ito TS pag nag up salamat

Ayaw pa din po lagging error bat ganun
sa botfather click mo muna yung username ng bot mo tapos message ka isa
 

About this Thread

  • 115
    Replies
  • 8K
    Views
  • 42
    Participants
Last reply from:
etapuny222

Online now

Members online
388
Guests online
6,022
Total visitors
6,410

Forum statistics

Threads
2,271,187
Posts
28,939,930
Members
1,240,220
Latest member
piw
Back
Top