Metadata-Version: 2.1
Name: ruia_cache
Version: 0.0.2
Summary: ruia_cache - A Ruia plugin for caching URL.
Home-page: https://github.com/python-ruia/ruia-cache
Author: Howie Hu
Author-email: xiaozizayang@gmail.com
License: MIT
Project-URL: Documentation, https://github.com/python-ruia/ruia-cache
Project-URL: Source, https://github.com/python-ruia/ruia-cache
Description: # ruia-cache
        
        A [Ruia](https://github.com/howie6879/ruia) plugin for caching URL
        
        ## Installation
        
        ```shell script
        pip install -U ruia-cache
        
        # New features
        pip install git+https://github.com/python-ruia/ruia-cache
        ```
        
        ## Usage
        
        `ruia-cache` will automatically cache the captured URL to prevent the second request to the target web page:
        
        ```python
        import os
        
        from ruia_cache import RuiaCacheSpider
        
        # Set RUIA_CACHE path
        os.environ.setdefault(
            "RUIA_CACHE", os.path.dirname(__file__),
        )
        
        
        class Demo(RuiaCacheSpider):
            name = "demo_spider"
            start_urls = ["http://httpbin.org/get"]
        
            async def parse(self, response):
                html = await response.text()
                print(html)
        
        
        if __name__ == "__main__":
            Demo.start()
            # Using cache data
            Demo.start()
        ```
        
        Enjoy it :)
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Description-Content-Type: text/markdown
