Last active
December 20, 2015 12:29
-
-
Save vralex/6131049 to your computer and use it in GitHub Desktop.
Скрипт для проверки страницы на наличие изменений
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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