Universal RSS Parser.
extra features:
- work with any rss and atom feed format.
- smart cache
- multiple rss support
- parallel parser
- parse rss podcast.
## Installation
```
pip install kolak
```
## Usage Example
```python
from kolak import Parser
url = ""
rss = Parser(url)
items = rss.parse()
print("title:", rss.title)
print("description:", rss.description)
print("permalink:", rss.permalink)
print("updated:", rss.updated)
print("author:", rss.author)
print("-"*10)
for item in items:
print("title:", item["title"])
print("date:", item["date"])
print("description:",item["description"])
print("link:",item["link"])
print("link_image", item["link_image"])
print("link_podcast:",item["link_podcast"])
print("-"*10) # line
```
multiple rss processing
```
url1 = ""
url2 = ""
rss1 = Parser(url1)
items1 = rss1.parse()
rss2 = Parser(url2)
items2 = rss2.parse()
items = items1+items2
```
also you can pass raw xml feed as url input in `Parser()`.
### parse option
```python
rss.parse(limit=0, debug=False, parallel=False)
"""
limit: limitable items parse, 0 = nolimited
debug: activate debug mode. when no model is match, you will see what happened on kolak.log
parallel: use multiprocessing to parse items (experimental)
"""
```
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/guangrei/Kolak",
"name": "kolak",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "rss feed parser podcast xml",
"author": "guangrei",
"author_email": "myawn@pm.me",
"download_url": "https://files.pythonhosted.org/packages/19/c0/ad81eb6651d706d76582015394c9e18740935143430f33705021721845f2/kolak-0.1.5.tar.gz",
"platform": null,
"description": "Universal RSS Parser.\n\nextra features:\n\n- work with any rss and atom feed format.\n- smart cache\n- multiple rss support\n- parallel parser\n- parse rss podcast.\n\n## Installation\n\n```\npip install kolak\n```\n\n## Usage Example\n\n```python\nfrom kolak import Parser\n\nurl = \"\"\nrss = Parser(url)\nitems = rss.parse()\nprint(\"title:\", rss.title)\nprint(\"description:\", rss.description)\nprint(\"permalink:\", rss.permalink)\nprint(\"updated:\", rss.updated)\nprint(\"author:\", rss.author)\nprint(\"-\"*10)\nfor item in items:\n\tprint(\"title:\", item[\"title\"])\n\tprint(\"date:\", item[\"date\"])\n\tprint(\"description:\",item[\"description\"])\n\tprint(\"link:\",item[\"link\"])\n\tprint(\"link_image\", item[\"link_image\"])\n\tprint(\"link_podcast:\",item[\"link_podcast\"])\n\tprint(\"-\"*10) # line\n```\n\nmultiple rss processing\n\n```\nurl1 = \"\"\nurl2 = \"\"\nrss1 = Parser(url1)\nitems1 = rss1.parse()\nrss2 = Parser(url2)\nitems2 = rss2.parse()\nitems = items1+items2\n```\nalso you can pass raw xml feed as url input in `Parser()`.\n\n### parse option\n\n```python\nrss.parse(limit=0, debug=False, parallel=False)\n\n\"\"\"\nlimit: limitable items parse, 0 = nolimited\n\ndebug: activate debug mode. when no model is match, you will see what happened on kolak.log\n\nparallel: use multiprocessing to parse items (experimental)\n\"\"\"\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "universal rss parser",
"version": "0.1.5",
"project_urls": {
"Homepage": "https://gitlab.com/guangrei/Kolak"
},
"split_keywords": [
"rss",
"feed",
"parser",
"podcast",
"xml"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "19c0ad81eb6651d706d76582015394c9e18740935143430f33705021721845f2",
"md5": "1a857f23da60a5997ba545a71a61a3b9",
"sha256": "f5a0415ec0b28fffa37527cd3174fbf241809013288f0430e34c48485f48d508"
},
"downloads": -1,
"filename": "kolak-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "1a857f23da60a5997ba545a71a61a3b9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5033,
"upload_time": "2023-06-20T18:43:06",
"upload_time_iso_8601": "2023-06-20T18:43:06.351124Z",
"url": "https://files.pythonhosted.org/packages/19/c0/ad81eb6651d706d76582015394c9e18740935143430f33705021721845f2/kolak-0.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-20 18:43:06",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "guangrei",
"gitlab_project": "Kolak",
"lcname": "kolak"
}