fetchrss.com api的简单接口
fetchrss-api的Python项目详细描述
fetchrss api:fetchrssapi的python客户端库
安装
pip install fetchrss-api
直接从github上的git存储库:
pip install git+https://github.com/Impacto-jor/fetchrss-api.git
或
git clone https://github.com/Impacto-jor/fetchrss-api.git
cd fetchrss-api
python setup.py install
在Python3.7.0上测试(通过安装dataclasses
,您可以使用3.6运行
包装)。
用法
通过示例学习:
fromfetchrssimportFetchRSS# Instantiate the objectapi=FetchRSS(access_token="<super secret>")# Create a new feed using URL onlyfeed=api.feed_create(url="https://some-url/")print(f"Feed created: {feed}")# Create a new feed using all parametersfeed=api.feed_create(url="https://some-url/",news_selector="<news selector>",title_selector="<title selector>",content_selector="<content selector>",pic_selector="[optional picture selector]",date_selector="[optional date selector]",author_selector="[optional author selector]",link_selector="[optional link selector]",pic_src_param="[optional picture source parameter]",date_format_param="[optional date format parameter]",)print(f"Feed created: {feed}")# List all available feedsforfeedinapi.feeds():print(feed)# Get RSS entries for a specific feedforentryinapi.rss(feed):print(entry)