|
@@ -63,9 +63,9 @@ def refreshFur():
|
|
|
if 'title:' in line:
|
|
|
tmpfurniture['title'] = re.split('"|\n', line)[1]
|
|
|
if 'date:' in line:
|
|
|
- tmpfurniture['date'] = re.split(':"|\n', line)[0].removeprefix('date: ')
|
|
|
+ tmpfurniture['date'] = re.split(':"|\n', line)[0][6:]
|
|
|
if 'draft:' in line:
|
|
|
- tmpfurniture['draft'] = re.split(':"|\n', line)[0].removeprefix('draft: ')
|
|
|
+ tmpfurniture['draft'] = re.split(':"|\n', line)[0][7:]
|
|
|
if 'type:' in line:
|
|
|
tmpfurniture['type'] = re.split('"|\n', line)[1]
|
|
|
if 'url:' in line:
|
|
@@ -75,7 +75,7 @@ def refreshFur():
|
|
|
if 'tags:' in line:
|
|
|
tmpfurniture['tags'] = re.split('"|\n', line)[1]
|
|
|
# 避免加入類別項目
|
|
|
- if tmpfurniture['type'] != tmpfurniture['url'].removeprefix('/'):
|
|
|
+ if tmpfurniture['type'] != tmpfurniture['url'][1:]:
|
|
|
furnitures.append(tmpfurniture)
|
|
|
|
|
|
|