This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class JSendMixin(object): | |
| """http://labs.omniti.com/labs/jsend | |
| JSend is a specification that lays down some rules for how JSON | |
| responses from web servers should be formatted. | |
| JSend focuses on application-level (as opposed to protocol- or | |
| transport-level) messaging which makes it ideal for use in | |
| REST-style applications and APIs. | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import urllib2 | |
| from Queue import Queue | |
| from threading import Thread | |
| # global var | |
| remaind_urls = Queue() | |
| fetched_urls = set() | |
NewerOlder