{ "info": { "author": "Lukasz Janyst", "author_email": "xyz@jany.st", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Scrapy", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "===================\nscrapy-rss-exporter\n===================\n\nGenerate an RSS feed using the `Scrapy `_ framework.\n\nTable of Contents\n=================\n\n* `Installation <#installation>`__\n* `Usage <#usage>`__\n\n * `Feed Items <#feed-items>`__\n * `Global Exporter <#global-exporter>`__\n * `Per Spider Exporter <#per-spider-exporter>`__\n\nInstallation\n============\n\n* Install :code:`scrapy-rss-exporter` using :code:`pip`:\n\n .. code:: bash\n\n pip install scrapy-rss-exporter\n\n* or using :code:`setuptools`:\n\n .. code:: bash\n\n python setup.py install\n\nUsage\n=====\n\nFeed Items\n----------\n\nThe most convenient way to use the exporter is to return the objects of\n:code:`RssItem` class from your spiders. This class derives from\n:code:`scrapy.Item`, so it will work with other exporters as well.\n\nYou will need to set the following keys:\n\n.. code:: python\n\n from scrapy_rss_exporter.items import RssItem, Enclosure\n\n rss_item = RssItem()\n rss_item['title'] = 'Item title'\n rss_item['link'] = 'Item url'\n rss_item['guid'] = 'Item ID'\n rss_item['description'] = 'Item Description'\n rss_item['pub_date'] = None\n rss_item['enclosure'] = [Enclosure(url=img, type='image/jpeg')]\n\nThe :code:`pub_date` field should contain a date in the\n`RFC882 `_\nformat. If you use :code:`None`, the system will insert the current date\nin the appropriate format. The :code:`enclosure` field is optional and should\ncontain a (possibly empty) list of :code:`Enclosure` objects.\n\nGlobal Exporter\n---------------\n\nTo set the exporter up globally, you need to declare it in the\n:code:`FEED_EXPORTERS` dictionary in the :code:`settings.py` file:\n\n.. code:: python\n\n FEED_EXPORTERS = {\n 'rss': 'scrapy_rss_exporter.exporters.RssItemExporter'\n }\n\nYou can then use it as a :code:`FEED_FORMAT` and specify the output file in the\n:code:`FEED_URI`:\n\n.. code:: python\n\n FEED_FORMAT = 'rss'\n FEED_URI = 's3://my-feeds/my-feed.rss'\n\n**Note:** Bear in mind that, if you use a local file as output, :code:`scrapy`\nwill append to an existing file resulting with an invalid RSS code. You should,\ntherefore, make sure to delete any existing output file before running the\nspider. The :code:`s3` storage does not have this problem because\n:code:`scrapy` uploads are using the :code:`S3 PutObject` method.\n\n:code:`scrapy` does not seem to allow to push any configuration option to an\nexporter. Therefore, if you want to customize the feed title and other metadata,\nyou need to create a subclass and update the :code:`FEED_EXPORTERS` dictionary\nwith the new class name:\n\n.. code:: python\n\n class MyRssExporter(RssItemExporter):\n def __init__(self, *args, **kwargs):\n kwargs['title'] = 'My RSS'\n kwargs['link'] = 'https://www.mywebsite.com'\n kwargs['description'] = 'My RSS Items'\n super(MyRssExporter, self).__init__(*args, **kwargs)\n\nPer Spider Exporter\n-------------------\n\nYou can, of course, specify a different exporter with different settings for\neach spider. Just use the :code:`custom_settings` field to override the global\nconfiguration fields:\n\n.. code:: python\n\n class MySpider(scrapy.Spider):\n name = \"my\"\n start_urls = ['https://www.mywebsite.com']\n custom_settings = {\n 'FEED_EXPORTERS': {'rss': 'project.spiders.my_spider.MyExporter'},\n 'FEED_FORMAT': 'rss',\n 'FEED_URI': 's3://my-feeds/my-feed.rss',\n }\n\n def parse(self, response):\n pass\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ljanyst/scrapy-rss-exporter", "keywords": "", "license": "BSD License", "maintainer": "", "maintainer_email": "", "name": "scrapy-rss-exporter", "package_url": "https://pypi.org/project/scrapy-rss-exporter/", "platform": "", "project_url": "https://pypi.org/project/scrapy-rss-exporter/", "project_urls": { "Homepage": "https://github.com/ljanyst/scrapy-rss-exporter" }, "release_url": "https://pypi.org/project/scrapy-rss-exporter/0.1/", "requires_dist": [ "scrapy (>=1.4.0)" ], "requires_python": "", "summary": "An RSS Exporter for Scrapy", "version": "0.1" }, "last_serial": 3354948, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "fc4d4e0ba9d41f89a30c93715658a076", "sha256": "b78bf9ad7d9a59d50e7519222b6b81fef7ff8aee804fc64f01346198d8e61ba6" }, "downloads": -1, "filename": "scrapy_rss_exporter-0.1-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "fc4d4e0ba9d41f89a30c93715658a076", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6682, "upload_time": "2017-11-22T11:04:02", "url": "https://files.pythonhosted.org/packages/84/50/52267b4506aa6aca29d2d50497679a34f54765b679e6fffeb593988c3caa/scrapy_rss_exporter-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fad15db30d87bd8c68c4405d3641dcd6", "sha256": "c3bcbf1f8c1c15c386f4883ecfc62d3a60932d2ca6c945ee3390f3f80a71338e" }, "downloads": -1, "filename": "scrapy-rss-exporter-0.1.tar.gz", "has_sig": true, "md5_digest": "fad15db30d87bd8c68c4405d3641dcd6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3925, "upload_time": "2017-11-22T11:04:04", "url": "https://files.pythonhosted.org/packages/3d/ca/b297b8fc1777861dcaef2dccc40d004adebd6167c13fb848328ab8af832f/scrapy-rss-exporter-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fc4d4e0ba9d41f89a30c93715658a076", "sha256": "b78bf9ad7d9a59d50e7519222b6b81fef7ff8aee804fc64f01346198d8e61ba6" }, "downloads": -1, "filename": "scrapy_rss_exporter-0.1-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "fc4d4e0ba9d41f89a30c93715658a076", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6682, "upload_time": "2017-11-22T11:04:02", "url": "https://files.pythonhosted.org/packages/84/50/52267b4506aa6aca29d2d50497679a34f54765b679e6fffeb593988c3caa/scrapy_rss_exporter-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fad15db30d87bd8c68c4405d3641dcd6", "sha256": "c3bcbf1f8c1c15c386f4883ecfc62d3a60932d2ca6c945ee3390f3f80a71338e" }, "downloads": -1, "filename": "scrapy-rss-exporter-0.1.tar.gz", "has_sig": true, "md5_digest": "fad15db30d87bd8c68c4405d3641dcd6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3925, "upload_time": "2017-11-22T11:04:04", "url": "https://files.pythonhosted.org/packages/3d/ca/b297b8fc1777861dcaef2dccc40d004adebd6167c13fb848328ab8af832f/scrapy-rss-exporter-0.1.tar.gz" } ] }