mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-08 08:33:45 +01:00
Fix topic ID parse error in import topics task
This commit is contained in:
parent
85340a2fe9
commit
1da86f27a7
@ -99,11 +99,19 @@ def parseTitle(title):
|
|||||||
def getLinksFromModSearch():
|
def getLinksFromModSearch():
|
||||||
links = {}
|
links = {}
|
||||||
|
|
||||||
contents = urllib.request.urlopen("https://krock-works.uk.to/minetest/modList.php").read().decode("utf-8")
|
try:
|
||||||
for x in json.loads(contents):
|
contents = urllib.request.urlopen("https://krock-works.uk.to/minetest/modList.php").read().decode("utf-8")
|
||||||
link = x.get("link")
|
for x in json.loads(contents):
|
||||||
if link is not None:
|
try:
|
||||||
links[int(x["topicId"])] = link
|
link = x.get("link")
|
||||||
|
if link is not None:
|
||||||
|
links[int(x["topicId"])] = link
|
||||||
|
except ValueError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
except urllib.error.URLError:
|
||||||
|
print("Unable to open krocks mod search!")
|
||||||
|
return links
|
||||||
|
|
||||||
return links
|
return links
|
||||||
|
|
||||||
|
@ -12,7 +12,8 @@ GitHub-Flask~=3.2
|
|||||||
SQLAlchemy-Searchable==1.0.3
|
SQLAlchemy-Searchable==1.0.3
|
||||||
|
|
||||||
beautifulsoup4~=4.6
|
beautifulsoup4~=4.6
|
||||||
celery~=4.2
|
celery==4.1.1
|
||||||
|
kombu==4.2.0
|
||||||
GitPython~=2.1
|
GitPython~=2.1
|
||||||
lxml~=4.2
|
lxml~=4.2
|
||||||
pillow~=5.3
|
pillow~=5.3
|
||||||
|
Loading…
Reference in New Issue
Block a user