diff --git a/checks/utils/fetchers.py b/checks/utils/fetchers.py index f42eae2..762ba71 100644 --- a/checks/utils/fetchers.py +++ b/checks/utils/fetchers.py @@ -8,7 +8,7 @@ def matchGist(url): return re.match( - r"(?i)\b((?:https?:(?:/{1,3}gist\.github\.com)/)(anonymous/)?([a-z0-9]{32}))", url) + r"(?i)\b((?:https?:(?:/{1,3}gist\.github\.com)/)((anonymous|[A-Za-z0-9-]{1,39})/)?([a-z0-9]{32}))", url) def getGist(inputUrl): @@ -24,7 +24,7 @@ def getLinesGist(gistObject): def getDescriptionGist(gistObject): desc = gistObject['description'] - if (desc == ""): + if (desc == "" or desc is None): desc = gistObject['id'] return [0, "DESCRIPTION", desc]