We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pixiy.py
# -*- coding: utf-8 -*- from middlewares import middleware from asyncpy.spider import Spider from loguru import logger class PixivSpider(Spider): name = 'pixiv' start_urls = [] cookies = { *** } headers = { *** } async def start_requests(self): user_id = list( set([12651854, 13926781])) for i in user_id: url = f'https://www.pixiv.net/ajax/user/{i}/profile/all?lang=zh' yield self.request(url=url, callback=self.parse, cookies=self.cookies, meta={'user_id': i}, method="GET", headers=self.headers) break async def parse(self, response): logger.debug(response.text) PixivSpider.start(middleware=middleware)
大佬你好,我编写上面程序时会报 RuntimeError: Event loop is closed 我的python版本3.8 asyncpy 1.2.0 aiohttp 3.8.1
我不是很会python的异步编程,请大佬指点
The text was updated successfully, but these errors were encountered:
为什么要在yield后面加break,这样就只会执行一次就退出了
Sorry, something went wrong.
No branches or pull requests
pixiy.py
大佬你好,我编写上面程序时会报 RuntimeError: Event loop is closed
我的python版本3.8
asyncpy 1.2.0
aiohttp 3.8.1
我不是很会python的异步编程,请大佬指点
The text was updated successfully, but these errors were encountered: