+# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+#
import json
from urllib.request import urlopen
import sys
def find_wikidata(link, lang):
link = link.rstrip()
title = link.rsplit("/", 1)[-1]
- title = link.split("#", 1)[0]
+ title = title.split("#", 1)[0]
title = title.replace(" ", "_")
data = json.load(
urlopen(