MCPcopy Create free account
hub / github.com/chinesehuazhou/python-weekly / process_entry

Function process_entry

resources/weekly_collection.py:64–74  ·  view source on GitHub ↗
(entry)

Source from the content-addressed store, hash-verified

62
63
64def process_entry(entry):
65 published_parsed = getattr(entry, 'published_parsed', None)
66 updated_parsed = getattr(entry, 'updated_parsed', None)
67 # pubDate
68 parsed_time = published_parsed if published_parsed else updated_parsed
69 if parsed_time:
70 published = datetime(*parsed_time[:6])
71 if datetime.now() - published <= timedelta(days=7):
72 print(entry.title)
73 return entry.title, entry.link
74 return None, None
75
76
77async def set_weekly_news():

Callers 1

get_last_issue_asyncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected