This commit is contained in:
TheTechRobo 2022-06-05 12:09:17 -04:00
parent 867a616bed
commit 638d9edb26
2 changed files with 5 additions and 2 deletions

View File

@ -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:

View File

@ -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):