diff options
Diffstat (limited to 'atom/atom.py')
-rwxr-xr-x | atom/atom.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/atom/atom.py b/atom/atom.py index c6e38d2..b240378 100755 --- a/atom/atom.py +++ b/atom/atom.py @@ -102,10 +102,13 @@ def add_blogpost(path, dryrun=False): img["src"] = urlparse.urljoin(url, img["src"]) for a in main.find_all("a"): - if "headerlink" in a["class"]: # remove "¶" - a.decompose() - continue - a["href"] = urlparse.urljoin(url, a["href"]) + try: + if "headerlink" in a["class"]: # remove "¶" + a.decompose() + continue + a["href"] = urlparse.urljoin(url, a["href"]) + except KeyError: # just a regular link, no class attribute + pass add_entry( { |