| @@ -94,7 +94,7 @@ def process_feed(obj): | |||||
| entry_dir = get_valid_filename(entry.link) # input e.g. https://orf.at/stories/3117136/ | entry_dir = get_valid_filename(entry.link) # input e.g. https://orf.at/stories/3117136/ | ||||
| entry_path = assets_path + '/'+ entry_dir | entry_path = assets_path + '/'+ entry_dir | ||||
| if not os.path.exists(entry_path): | if not os.path.exists(entry_path): | ||||
| print('New item: ', entry.link) | |||||
| print('New item:', entry.link) | |||||
| r = requests.get(entry.link.split('?')[0], headers=requestheaders) | r = requests.get(entry.link.split('?')[0], headers=requestheaders) | ||||
| online_soup = BeautifulSoup(r.text, 'html.parser') | online_soup = BeautifulSoup(r.text, 'html.parser') | ||||
| @@ -215,6 +215,7 @@ def process_feed(obj): | |||||
| os.makedirs(feeds_path, exist_ok=True) | os.makedirs(feeds_path, exist_ok=True) | ||||
| f = open(feeds_path + '/' + output_filename, 'w') | f = open(feeds_path + '/' + output_filename, 'w') | ||||
| print('Done!') | |||||
| f.write(str(feed_soup)) | f.write(str(feed_soup)) | ||||
| f.close() | f.close() | ||||