diff --git a/crawler.py b/crawler.py index 0aafa3d..2fb6e90 100644 --- a/crawler.py +++ b/crawler.py @@ -88,8 +88,7 @@ def get_article_ids(page=""): data.update(dict(articles=id_list)) return data - else: - soup = BeautifulSoup(response.text, 'html.parser') - error = soup.find('title') - error_message = dict(error=error.get_text()) - return error_message + soup = BeautifulSoup(response.text, 'html.parser') + error = soup.find('title') + error_message = dict(error=error.get_text()) + return error_message diff --git a/deploy.sh b/deploy.sh index 24edc00..9639e69 100644 --- a/deploy.sh +++ b/deploy.sh @@ -1,3 +1,4 @@ +#!/bin/bash sudo pkill screen sudo pkill flask sudo rm -rf ./hey-ptt