News for hackers. Stuff that matters.

binux

Re:Show HN: A Python Spider System with Web UI on Tuesday November 18, 2014 @12:17AM (#8622482)
I'm working on a benchmarking suite https://gist.github.com/binux/67b276c51e988f8e2c31 and meet some problem...

pyspider comes from a vertical search engine project. we have two issues:

- 100+ websites, they may change the template or down sometime. We need a dashboard to monitor the changes and the fails.

- update in 5 minutes, when the website updated, we need follow that in 5 minutes. We are using a update time from index(list) page to tell the changed pages. And pages should been updated after about 30 days in case of we missed something. A powerful scheduler is needed.

obviously, I hadn't got the right way to do so with scrapy. I'm not very familiar with scrapy. So I can't say something pyspider can do but scrapy not.

Re:Show HN: A Python Spider System with Web UI on Monday November 17, 2014 @12:47PM (#8619339)
Images not downloaded default. Both the fetcher and the phantomjs proxy is totally async.
Re:Show HN: A Python Spider System with Web UI on Monday November 17, 2014 @11:52AM (#8619024)
I want to make it a http proxy in the beginning. But I found it hard to do so. Then I post every to it, but haven't change the name.

But it works like a proxy, that any request with `fetch_type == 'js'` would be fetched through phantomjs and the response back to tornado_fetcher.

Re:Show HN: A Python Spider System with Web UI on Monday November 17, 2014 @11:23AM (#8618847)
The fetcher fit you already...
Re:Show HN: A Python Spider System with Web UI on Monday November 17, 2014 @09:03AM (#8618200)
the architecture of pyspider: http://blog.binux.me/assets/image/pyspider-arch.png

And yes for centralized queue which is in scheduler. It's designed to satisfy about 10-100 million urls for each project.

scheduler, fetchers, processors are connected with rabbitmq(alternatively). Only one scheduler is allowed. But you can run multiple fetchers or processors as needed.

Re:Show HN: A Python Spider System with Web UI on Monday November 17, 2014 @08:33AM (#8618105)
sorry :(
Re:Show HN: A Python Spider System with Web UI on Monday November 17, 2014 @08:33AM (#8618100)
To make it more flexible and easy to reuse? I have implemented most features I need now.
Re:Show HN: A Python Spider System with Web UI on Monday November 17, 2014 @08:27AM (#8618072)
http://demo.pyspider.org/debug/js_test_sciencedirect is a sample for this.

There is a phantomjs fetcher that can render the page as WebKit did. Furthermore, you can have some JavaScript running before/after page loaded to simulate a mouse click.

Re:Show HN: A Python Spider System with Web UI on Monday November 17, 2014 @08:20AM (#8618032)
I have "organize the code using a single top-level package".
Re:Show HN: A Python Spider System with Web UI on Monday November 17, 2014 @03:16AM (#8617319)
Yes, the scheduler, fetcher, processor is stand alone here, they are running in different process. But they are sharing some common libs. I haven't made a decision how to put them into a single package, and running together.

Any advice or project that I can refer to?

Re:Show HN: A Python Spider System with Web UI on Sunday November 16, 2014 @11:53PM (#8616897)
agree
Re:Show HN: A Python Spider System with Web UI on Sunday November 16, 2014 @11:40PM (#8616863)
Currently, yes and no.

pyspider is running original python code, something like portia is a code generator (Apologize if I'm wrong, I have not use it). So it can been made as another WebUI module.

But for flexible, I have no idea how to make it right currently. So, We have a css selector helper, but no plan for a complete tool.