optimize economist world brief item url

This commit is contained in:
hillerliao
2022-07-13 15:16:19 +08:00
parent 7cffb72621
commit 0001db454e

View File

@@ -9,7 +9,7 @@ def parse(post):
item['title'] = post.css('div.e18qdnq10').get()
item['title'] = re.sub(r'<[^>]*>', '', item['title']).strip()
item['description'] = item['title']
link = f"{domain}/the-world-in-brief"
item['link'] = f"{domain}/the-world-in-brief" + '?from=' + item['title'][:30]
return item
def ctx(category=''):