GitShow/rmax/scrapydo
rmax

scrapydo

Crochet-based blocking API for Scrapy.

by rmax
Star on GitHubFork

Jupyter Notebook

47 stars11 forks3 contributorsQuiet · 9y agoSince 2015MIT

Meet the team

See all 3 on GitHub →
rmax
rmax17 contributions
olivmaurel
olivmaurel2 contributions
rolando
rolando2 contributions

Languages

View on GitHub →
Jupyter Notebook93.8%
Python6.2%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

2 of 6 standards met

Community profile →
42
✓README✓License○Contributing○Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Quiet · 3 discussions · Last activity 9y ago
See all on GitHub →
rmax
Provide better error handlingOpenIssue

There are several cases that cause to fail silently and return nothing. Ideally, we should be able to propagate somehow the exceptions.

rmax · 9y ago
rmax
Check compatibility with latest scrapy releasesOpenIssue
rmax · 9y ago

Recent fixes

View closed PRs →
wsgggws
How to except Error when spider raise Errors.ClosedIssue

I use code: ERROR:scrapy.core.scraper:Spider error processing (referer: None) Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/scrapy/utils/defer.py", line 102, in iter_errback yield next(it) File "/usr/local/lib/python3.6/site-packages/scrapy/spidermiddlewares/offsite.py", line 30, in process_spider_output for x in result: File "/usr/local/lib/python3.6/site-packages/scrapy/spidermiddlewares/referer.py", line 339, in return (_set_referer(r) for r in result or ()) File "/usr/local/lib/python3.6/site-packages/scrapy/spidermiddlewares/urllength.py", line 37, in return (r for r in result or () if _filter(r)) File "/usr/local/lib/python3.6/site-packages/scrapy/spidermiddlewares/depth.py", line 58, in return (r for r in result or () if _filter(r)) File "/Users/hjtian/github/courier-spiders/crawler/crawler/spiders/aftership_spider.py", line 62, in parse raise TypeError TypeError

wsgggws · 8mo ago
jbohannon
scrapydo.fetch() AttributeErrorClosedIssue

I'm trying scrapydo and can't even get started: import scrapydo scrapydo.setup() url = "http://google.com" scrapydo.fetch(url) Traceback (most recent call last): File "", line 1, in File "/Users/john/anaconda/envs/py3/lib/python3.4/site-packages/scrapydo/api.py", line 51, in fetch return crawler.spider.response AttributeError: 'DefaultSpider' object has no attribute 'response'

jbohannon · 9y ago
olivmaurel
run_spider() as a generator for Django's StreamingHttpResponseClosedIssue

Hi ! I have a question about the run_spider() method and how to use it as a generator. I am using scrapydo inside a django project, where a user can type a keyword in a form, submit and get the results from three different spiders, called by scrapydo.run_spider(). When there are many results (100+), the page is hanging for a while before displaying the results. I would like to display each item as soon as it's scraped, using StreamingHttpResponse() and a generator. The thing is, although the parse() method from spider is yielding items, I can't manage to yield items using the scrapydo.run_spider() method. I have tried to add a new signal handler with the 'item_passed' signal, but it's still not working. Here's what i tried I have added a 'yield_items' flag in the function _run_spider_in_reactor, which calls a signal handler to yield every item with the item_passed signal Then in my test view in view.py I iterate through every item returned by run_spider() and I yield every item. when I call the view on the browser using http://localhost:8000/streamer, the page hangs for 5 seconds and then displays all the results at once, just like with a regular HttpResponse. Do you have any idea of what I am doing wrong and how I could make it work ? Thanks a lot!

olivmaurel · 9y ago
Structured data for AI agents

Repository: rmax/scrapydo. Description: Crochet-based blocking API for Scrapy. Stars: 47, Forks: 11. Primary language: Jupyter Notebook. Languages: Jupyter Notebook (93.8%), Python (6.2%). License: MIT. Open PRs: 0, open issues: 3. Last activity: 9y ago. Community health: 42%. Top contributors: rmax, olivmaurel, rolando.

·@ofershap

Replace github.com with gitshow.dev