From a4b9e7db7c9b42b9690a51c982805a2280dc9925 Mon Sep 17 00:00:00 2001 From: Andreas Demmelbauer Date: Tue, 2 Apr 2019 14:53:47 -0700 Subject: [PATCH] assetS typo ... --- feedcake.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/feedcake.py b/feedcake.py index ed9171f..8d9ad90 100644 --- a/feedcake.py +++ b/feedcake.py @@ -34,7 +34,7 @@ assets_path = public_path + '/assets' feeds_path = public_path + '/feeds' # e.g. https://example.com/some-string -asset_url = config['asset_url'] +assets_url = config['assets_url'] @@ -155,13 +155,13 @@ def process_feed(feed_url, output_filename): old_url = img['data-src'] if not old_url.startswith('data:'): new_filename = filename_from_url(old_url) - img['data-src'] = asset_url + '/' + entry_dir + '/' + new_filename + img['data-src'] = assets_url + '/' + entry_dir + '/' + new_filename download_image(old_url, entry_dir, new_filename) if img.get('src'): old_url = img['src'] if not old_url.startswith('data:'): new_filename = filename_from_url(old_url) - img['src'] = asset_url + '/' + entry_dir + '/' + new_filename + img['src'] = assets_url + '/' + entry_dir + '/' + new_filename download_image(old_url, entry_dir, new_filename) if img.get('data-srcset'): srcset = img['data-srcset'].split(', ') @@ -171,7 +171,7 @@ def process_feed(feed_url, output_filename): src_res = src.split(' ')[1] new_filename = filename_from_url(old_url) download_image(old_url, entry_dir, new_filename) - new_url = asset_url + '/' + entry_dir + '/' + new_filename + new_url = assets_url + '/' + entry_dir + '/' + new_filename src = ' '.join([new_url, src_res]) new_srcset.append(src) img['data-srcset'] = ', '.join(new_srcset)