Skip to content

Commit b796224

Browse files
author
Conrad Lukawski
committed
Handle match failure on CBC links
1 parent f64c1a9 commit b796224

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

plugins/Titler/plugin.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,6 +1138,10 @@ def _cbctitle(self, url):
11381138
# get article id from url
11391139
query = urlparse(url)
11401140
m = re.search('(?<=1.)[0-9]+', query.path)
1141+
if not m:
1142+
self.log.error("_cbctitle: could not find article id")
1143+
return None
1144+
11411145
articleid = "1.%s" % m.group(0)
11421146

11431147
# try loading cbc api

0 commit comments

Comments
 (0)