GithubHelp home page GithubHelp logo

woxcab / scrapy_rss Goto Github PK

View Code? Open in Web Editor NEW
29.0 29.0 4.0 437 KB

Tools to easy generate RSS feed that contains each scraped item using Scrapy framework.

License: BSD 3-Clause "New" or "Revised" License

Python 96.81% Dockerfile 3.19%
python python-2 python-3 python2 python3 rss rss-feed scrapy

scrapy_rss's People

Contributors

loleg avatar woxcab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

scrapy_rss's Issues

Cannot pass dictionary to a RssedItem constructor

If item is described as

import scrapy
import scrapy_rss
class MyItem(scrapy_rss.RssedItem):
    field = scrapy.Field()

then this statement

item = MyItem({'field': 'value'})

produces

TypeError: init() takes 1 positional argument but 2 were given

Wrong dependencies in Pypi package

Hi.

I just wanted to try out this package for a personal project, tried to install it with poetry (Python 3.8.2, poetry 1.0.3, pip 20.1), and go all kinds of dependency conflicts. It wanted to downgrade scrapy to version 1.4, use some old cryptography version, ...

I did some digging. If you extract the wheel package from Pypi, and look at the file metadata.json, you can see the requirements.

"run_requires": [{"requires": ["cryptography (<2.0)",
                               "pyOpenSSL (<17.3.0)",
                               "python-dateutil",
                               "scrapy (<1.5.0)",
                               "six"]}]

My guess is, that you created the wheel with Python 3.3. The trick that you did in the setup.py file doesn't work, if you package it into a wheel :

install_requires=['python-dateutil',
                  'scrapy<1.5.0' if sys.version_info[:2] == (3, 3)
                  else 'scrapy>=1.1,<1.8.0' if sys.version_info[:2] == (3, 4)
                  else 'scrapy>=1.1' if sys.version_info[:2] == (3, 5)
                  else 'scrapy>=1.3.1',
                  'six']

Not sure if it is possible to create on wheel that chooses different dependencies depending on the Python version. Maybe you need to create multiple wheels, one for each version.

As a fix for me, I'll just install the package directly via git.

How to export RSS to FTP

I use setting with working credentials
FEED_URI = 'ftp://userName:[email protected]/path/to/file.xml'

But scrapy crawl spider make error with message
ftplib.error_perm: 500 'STOR' not understood

feedUri is working, i test it in browser
spider is working, i test it locally

All i want now to export RSS to FTP. How it can be done?

Support for custom namespaces

Hello @woxcab,

Thanks for this package, very cool!

I was wondering, is there a way to produce items with custom namespaces? Like:

<item>
  ...
  <store:price>$42.42</store:price>
  <store:name>$42.42</store:name>
  ...
</item>

And the like? If no, I would be willing to create a PR to support this, can you share some insight on how would you go about implementing such a feature?

Thanks!
Reinier

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.