跳转到主要内容

FetchRSS.com API的简单接口

项目描述

fetchrss-api: FetchRSS API的Python客户端库

安装

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

在Python 3.7.0上进行了测试(您可以通过安装dataclasses包使用3.6版)。

用法

通过示例学习

from fetchrss import FetchRSS

# Instantiate the object
api = FetchRSS(access_token="<super secret>")

# Create a new feed using URL only
feed = api.feed_create(url="https://some-url/")
print(f"Feed created: {feed}")

# Create a new feed using all parameters
feed = 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 feeds
for feed in api.feeds():
    print(feed)

# Get RSS entries for a specific feed
for entry in api.rss(feed):
    print(entry)

项目详情


下载文件

下载适合您平台的应用程序。如果您不确定选择哪个,请了解更多关于安装包的信息。

源分发

fetchrss-api-0.1.4.tar.gz (3.6 kB 查看哈希)

上传时间:

由...

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面