Formatted-RSS-to-Telegram/FR2T/parser.py
2021-05-27 18:31:26 +08:00

15 lines
247 B
Python

import feedparser
def rssParser(url: str, user_agent: str):
return feedparser.parse(url, agent=user_agent)["entries"]
def objParser(obj: dict, url: str):
paths = url.split(".")
for p in paths:
obj = obj[p]
return obj