diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 748b753ad..f2a931c89 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -195,6 +195,7 @@ Taylor Obyen <162023405+taylorobyen@users.noreply.github.com> Kris Cherven twwn Shirish Pokhrel +Park Hyunwoo ******************** diff --git a/qt/aqt/addons.py b/qt/aqt/addons.py index b4f3868e7..d5fa3d873 100644 --- a/qt/aqt/addons.py +++ b/qt/aqt/addons.py @@ -1066,7 +1066,12 @@ class GetAddons(QDialog): def accept(self) -> None: # get codes try: - ids = [int(n) for n in self.form.code.text().split()] + sids = self.form.code.text().split() + sids = [ + re.sub(r"^https://ankiweb.net/shared/info/(\d+)$", r"\1", id_) + for id_ in sids + ] + ids = [int(id_) for id_ in sids] except ValueError: showWarning(tr.addons_invalid_code()) return