diff --git a/Makefile b/Makefile index bcb0c8d..35cf33a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ run: make clean - docker build -t img . + docker build -t strawpoll-grab . docker run -v "/media/thetechrobo/2tb/spoll:/finished" --rm img TheTechRobo --concurrent 1 clean: diff --git a/pipeline.py b/pipeline.py index 8804110..1b567ab 100644 --- a/pipeline.py +++ b/pipeline.py @@ -61,7 +61,10 @@ class CheckItemExists(SimpleTask): def process(self, item): resp = requests.get(f"https://strawpoll.me/{item['item_name']}") print(f"Got status code {resp.status_code}") - assert resp.status_code == 200, "Poll not found. Save time, archive better." + if resp.status_code != 200: + print("Poll not found. Save time, archive better.") + item.cancel() + raise Exception() class CheckIP(SimpleTask): def __init__(self):