From 6fb0ac4e5efb751eb90c204ba724d2a025226936 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Sat, 27 Jun 2020 13:16:06 +0000 Subject: [PATCH] Initial GitHub module only retrieving the actual repository --- codearchiver/modules/github.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 codearchiver/modules/github.py diff --git a/codearchiver/modules/github.py b/codearchiver/modules/github.py new file mode 100644 index 0000000..e3f5d22 --- /dev/null +++ b/codearchiver/modules/github.py @@ -0,0 +1,21 @@ +import codearchiver.core +import codearchiver.modules.git +import datetime +import re + + +class GitHubModule(codearchiver.core.Module): + name = 'github' + + @staticmethod + def matches(inputUrl): + return bool(re.match(r'^https?://(www\.)?github\.com/[^/]+/[^/]+(?