Metadata-Version: 1.1
Name: charlotte
Version: 0.0.9
Summary: Lightweight and expandable spider framework.
Home-page: https://github.com/Jack-Kingdom/charlotte
Author: Jack King
Author-email: email@qiaohong.org
License: MIT
Description: # charlotte
        
        [![Build Status](https://travis-ci.com/Jack-Kingdom/charlotte.svg?branch=master)](https://travis-ci.com/Jack-Kingdom/charlotte)
        
        Lightweight and expandable spider framework.
        
        ## Install
        ```shell
        pip install charlotte
        ```
        
        ## Example
        
        ```python
        import json
        from tornado.httpclient import HTTPRequest, HTTPResponse
        from charlotte.spider import BaseSpider
        
        
        class BlogSpider(BaseSpider):
        
            def start(self):
                yield "https://blog.qiaohong.org/api/v1/articles"
        
            def parse(self, response):
                lst = json.loads(response.body)
        
                for item in lst:
                    request = HTTPRequest("https://blog.qiaohong.org/api/v1/articles" + "/" + item['slug'])
                    setattr(request, 'parser', self.parse_detail)
        
                    self.scheduler.put(request)
        
            def parse_detail(self, response: HTTPResponse):
                detail = json.loads(response.body)
                print(detail)
        
        
        if __name__ == '__main__':
            BlogSpider().run()
        ```
        
        ## Documentation
        Check [wiki](https://github.com/Jack-Kingdom/charlotte/wiki) for details.
        
        ## LICENSE
        MIT
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Natural Language :: English
