Skip to content

Instantly share code, notes, and snippets.

@vralex
Last active December 20, 2015 12:29
Show Gist options
  • Save vralex/6131049 to your computer and use it in GitHub Desktop.
Save vralex/6131049 to your computer and use it in GitHub Desktop.
Скрипт для проверки страницы на наличие изменений
# -*- coding: utf8 -*-
__author__ = 'VladimirDel'
import urllib.request
import time
page_url = "http://ma.hse.ru"
prev_text = urllib.request.urlopen(page_url).read()
cur_text = prev_text
while prev_text == cur_text:
time.sleep(1)
cur_text = urllib.request.urlopen(page_url).read()
print("Changed!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment