mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2025-12-02 06:12:36 +00:00
small cleanups
This commit is contained in:
@@ -3,17 +3,14 @@ import chardet
|
||||
import os
|
||||
import requests
|
||||
import time
|
||||
import urllib3.exceptions
|
||||
import sys
|
||||
|
||||
|
||||
class EmptyReply(Exception):
|
||||
def __init__(self, status_code, url):
|
||||
# Set this so we can use it in other parts of the app
|
||||
self.status_code = status_code
|
||||
self.url = url
|
||||
return
|
||||
|
||||
pass
|
||||
|
||||
class ReplyWithContentButNoText(Exception):
|
||||
@@ -22,7 +19,6 @@ class ReplyWithContentButNoText(Exception):
|
||||
self.status_code = status_code
|
||||
self.url = url
|
||||
return
|
||||
|
||||
pass
|
||||
|
||||
|
||||
|
||||
@@ -189,7 +189,6 @@ class perform_site_check():
|
||||
if not empty_pages_are_a_change and len(stripped_text_from_html.strip()) == 0:
|
||||
raise content_fetcher.ReplyWithContentButNoText(url=url, status_code=200)
|
||||
|
||||
|
||||
# We rely on the actual text in the html output.. many sites have random script vars etc,
|
||||
# in the future we'll implement other mechanisms.
|
||||
|
||||
|
||||
@@ -19,8 +19,6 @@ def set_original_response():
|
||||
f.write(test_return_data)
|
||||
return None
|
||||
|
||||
|
||||
|
||||
def set_modified_response():
|
||||
test_return_data = """<html>
|
||||
<head><title>modified head title</title></head>
|
||||
|
||||
Reference in New Issue
Block a user