hello, I'm trying to run telegram bot. gethub code:

# UrlChange
# Checks for an updates to a given list of urls, and reports changes

# Tested with Python version 3.7.6

import requests
import re
import os
import schedule
import time

# Send a message via a telegram bot
def telegram_bot_sendtext(bot_message):
    bot_token = 'YOUR_BOT_TOKEN'
    bot_chatID = 'TELEGRAM_USER_CHAT_ID'
    send_text = '' + bot_token + '/sendMessage?chat_id=' + bot_chatID + '&parse_mode=Markdown&text=' + bot_message

    response = requests.get(send_text)

    return response.json()

def report_change(url):
    html_response = str(requests.get(url))
    file_name = ''.join(x for x in url if x.isalpha()) + ".txt"

    # Check if file exists that matches the page's content
    if os.path.exists(file_name):
        cache_file = open(file_name, "r")
        html_cache =
        # If the updated set is not equal to the stored set, update and report change
        if html_response != html_cache:
            cache_file = open(file_name, "w")
            print("website change reported!")
            # Send the message (such as with a telegram bot provided below)
            telegram_bot_sendtext("Website change detected at url: " + url)
            print("no change")
        # save the url's html content to a file
        print("no cache file for " + url + " found, creating one...")
        cache_file = open(file_name, "w")

# Read liust of urls from file
def scan_url():
    # Get list of urls from file:
    with open("urls.txt") as urls_file:
        urls_list = urls_file.readlines()
    urls_list = [x.strip() for x in urls_list]
    # Check each url for changes
    for url in urls_list:

# Initalize script to run every 2 minutes
while True:

but PythonAnywhere bash console gives me No module named 'schedule'. can you help me to solve?

Could you share the error?

(mysite-virtualenv) 12:42 ~ $ ls README.txt (mysite-virtualenv) 12:42 ~ $ python Traceback (most recent call last): File "", line 9, in <module> import schedule ImportError: No module named 'schedule' (mysite-virtualenv) 12:44 ~ $ python Traceback (most recent call last): File "", line 9, in <module> import schedule ImportError: No module named 'schedule' (mysite-virtualenv) 12:46 ~ $

You're missing the schedule module. That is either because you have not installed the package that provides it, or because it's code from your project that is either not there or not on your Python path. See our help page on how to debug errors like that:

the procedure I use is: $ mkvirtualenv --python=/usr/bin/python3 mysite-virtualenv

$ pip install pyTelegramBotAPI

$ python

what is wrong?

Is the schedule module included in the pyTelegramBotAPI package? If it's not, then you will need to install whatever package provides it.