摘要: ``` import asyncio import re import typing from concurrent.futures import Executor, ThreadPoolExecutor from urllib.request import urlopen DEFAULT_EXECUTOR = ThreadPoolExecutor(4) ANCHOR_TAG_PATTE... 阅读全文
posted @ 2019-06-15 18:29 公众号python学习开发 阅读(415) 评论(0) 推荐(0)
摘要: ``` import asyncio import functools from concurrent.futures.thread import ThreadPoolExecutor from requests_html import HTMLSession import sys session = HTMLSession() async def get_response(executor,... 阅读全文
posted @ 2019-06-15 18:01 公众号python学习开发 阅读(763) 评论(2) 推荐(0)
摘要: ``` import random import asyncio async def random_number_gen(delay, start, end): while True: yield random.randint(start, end) await asyncio.sleep(delay) async def main(): a... 阅读全文
posted @ 2019-06-15 16:57 公众号python学习开发 阅读(2020) 评论(0) 推荐(0)