معرفی شرکت ها


aio-scrapy-1.2.6


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

A high-level Web Crawling and Web Scraping framework based on Asyncio
ویژگی مقدار
سیستم عامل -
نام فایل aio-scrapy-1.2.6
نام aio-scrapy
نسخه کتابخانه 1.2.6
نگهدارنده []
ایمیل نگهدارنده []
نویسنده conlin
ایمیل نویسنده 995018884@qq.com
آدرس صفحه اصلی https://github.com/conlin-huang/aio-scrapy.git
آدرس اینترنتی https://pypi.org/project/aio-scrapy/
مجوز MIT
<!-- ![aio-scrapy](./doc/images/aio-scrapy.png) --> ### aio-scrapy An asyncio + aiolibs crawler imitate scrapy framework English | [中文](./doc/README_ZH.md) ### Overview - aio-scrapy framework is base on opensource project Scrapy & scrapy_redis. - aio-scrapy implements compatibility with scrapyd. - aio-scrapy implements redis queue and rabbitmq queue. - aio-scrapy is a fast high-level web crawling and web scraping framework, used to crawl websites and extract structured data from their pages. - Distributed crawling/scraping. ### Requirements - Python 3.7+ - Works on Linux, Windows, macOS, BSD ### Install The quick way: ```shell # Install the latest aio-scrapy pip install git+https://github.com/conlin-huang/aio-scrapy # default pip install aio-scrapy # Install all dependencies pip install aio-scrapy[all] # When you need to use mysql/httpx/rabbitmq/mongo pip install aio-scrapy[aiomysql,httpx,aio-pika,mongo] ``` ### Usage #### create project spider: ```shell aioscrapy startproject project_quotes ``` ``` cd project_quotes aioscrapy genspider quotes ``` quotes.py ```python from aioscrapy.spiders import Spider class QuotesMemorySpider(Spider): name = 'QuotesMemorySpider' start_urls = ['https://quotes.toscrape.com'] async def parse(self, response): for quote in response.css('div.quote'): yield { 'author': quote.xpath('span/small/text()').get(), 'text': quote.css('span.text::text').get(), } next_page = response.css('li.next a::attr("href")').get() if next_page is not None: yield response.follow(next_page, self.parse) if __name__ == '__main__': QuotesMemorySpider.start() ``` run the spider: ```shell aioscrapy crawl quotes ``` #### create single script spider: ```shell aioscrapy genspider single_quotes -t single ``` single_quotes.py: ```python from aioscrapy.spiders import Spider class QuotesMemorySpider(Spider): name = 'QuotesMemorySpider' custom_settings = { "USER_AGENT": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36", 'CLOSE_SPIDER_ON_IDLE': True, # 'DOWNLOAD_DELAY': 3, # 'RANDOMIZE_DOWNLOAD_DELAY': True, # 'CONCURRENT_REQUESTS': 1, # 'LOG_LEVEL': 'INFO' } start_urls = ['https://quotes.toscrape.com'] @staticmethod async def process_request(request, spider): """ request middleware """ return request @staticmethod async def process_response(request, response, spider): """ response middleware """ return response @staticmethod async def process_exception(request, exception, spider): """ exception middleware """ pass async def parse(self, response): for quote in response.css('div.quote'): yield { 'author': quote.xpath('span/small/text()').get(), 'text': quote.css('span.text::text').get(), } next_page = response.css('li.next a::attr("href")').get() if next_page is not None: yield response.follow(next_page, self.parse) async def process_item(self, item): print(item) if __name__ == '__main__': QuotesMemorySpider.start() ``` run the spider: ```shell aioscrapy runspider quotes.py ``` ### more commands: ```shell aioscrapy -h ``` ### Documentation [doc](./doc/documentation.md) ### Ready please submit your sugguestion to owner by issue ## Thanks [aiohttp](https://github.com/aio-libs/aiohttp/) [scrapy](https://github.com/scrapy/scrapy)


نیازمندی

مقدار نام
- aiohttp
- ujson
>=1.17.0 w3lib
>=1.5.0 parsel
>=2.0.5 PyDispatcher
>=5.1.0 zope.interface
>=4.3.1 redis
>=8.1.1 aio-pika
>=0.1.1 aiomysql
- cryptography
>=0.1.1 aiomysql
>=0.23.0 httpx[http2]
>=8.1.1 aio-pika
- cryptography
>=3.1.1 motor
>=0.23.0 httpx[http2]
>=3.1.1 motor


زبان مورد نیاز

مقدار نام
>=3.7 Python


نحوه نصب


نصب پکیج whl aio-scrapy-1.2.6:

    pip install aio-scrapy-1.2.6.whl


نصب پکیج tar.gz aio-scrapy-1.2.6:

    pip install aio-scrapy-1.2.6.tar.gz