scrapinghub / scrapyrt

HTTP API for Scrapy spiders
BSD 3-Clause "New" or "Revised" License
833 stars 162 forks source link

Python 3.x Support and Other Issues #39

Closed machbio closed 7 years ago

machbio commented 8 years ago

Looking for Python 3.x Support

from ConfigParser import SafeConfigParser, NoOptionError, NoSectionError
ImportError: No module named 'ConfigParser'
if isinstance(module, basestring):
NameError: name 'basestring' is not defined
for route, resource_path in settings.RESOURCES.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'
machbio commented 8 years ago

After I fixed the above issues and ran "scrapyrt" from the same folder as "scrapy.cfg" - I get the error -

<html>
  <head><title>404 - No Such Resource</title></head>
  <body>
    <h1>No Such Resource</h1>
    <p>No such child resource.</p>
  </body>
</html>
pawelmhm commented 8 years ago

hey @machbio

After I fixed the above issues

how did you fix them? Feel free to create PR with your fixes. Python 3 is important for us, but we're waiting for official and full support for Python 3 from Scrapy.

ran "scrapyrt" from the same folder as "scrapy.cfg" - I get the error -

are you making requests to crawl.json endpoint? The error message you get is shown when Twisted does not find resource for given handler. If you make request to crawl.json you should get response ok, see docs, request should go to:

http://localhost:9080/crawl.json
machbio commented 8 years ago

Scrapy 1.1 has support for Python3 - https://travis-ci.org/scrapy/scrapy/builds/135603444

Yes, I did use the correct Endpoint - it might have been the Twisted support for Python3.

aorzh commented 8 years ago

@pawelmhm , pls look pull request: https://github.com/scrapinghub/scrapyrt/pull/41 Hope it's help because Python 3 support very important for me.

pawelmhm commented 7 years ago

I started work on that @aorzh python 3 will appear in one of coming versions branch code is here #49

pawelmhm commented 7 years ago

closed via #49