Merge branch 'main' into hash
This commit is contained in:
commit
5c91dccc9e
1 changed files with 2 additions and 1 deletions
|
@ -27,6 +27,7 @@ log_file_name = r"/app.log"
|
|||
# Yes, I know you "can't parse HTML with regex", but
|
||||
# just watch me.
|
||||
html_filter = re.compile(r"\<\/?([A-Za-z \"\=])*\>")
|
||||
success_codes = ['200', '201', '202', '203', '204', '205', '206']
|
||||
|
||||
|
||||
def get_description(feed):
|
||||
|
@ -110,7 +111,7 @@ def main():
|
|||
r = requests.post(
|
||||
hook["webhook"], data=webhook_string, headers=custom_header
|
||||
)
|
||||
if r.status_code != "200":
|
||||
if r.status_code not in success_codes:
|
||||
print(
|
||||
"Error {} while trying to post {}".format(
|
||||
r.status_code, hook["webhook"]
|
||||
|
|
Loading…
Add table
Reference in a new issue