爬虫
赛佬的小迷弟
这个作者很懒,什么都没留下…
展开
-
RuntimeError: asyncio.run() cannot be called from a running event loop
学习协程异步操作出现的问题import asyncioimport timeasync def func_4(): print("营养快线") # time.sleep(3) # print("娃哈哈")if __name__=='__main__': g = func_4() # 此时的函数是异步协程函数,此时函数执行得到一个协程对象 asyncio.run(g)代码报错:RuntimeError: asyncio.run() cannot be原创 2021-05-15 15:28:07 · 6988 阅读 · 1 评论 -
服务器渲染和客户端渲染的区别
服务器渲染在服务器端直接将数据和 html进行整合,统一返还给浏览器特点:在页面源代码中能看到数据客户端渲染第一次请求只要一个html骨架,第二次请求拿到数据,在客户端整合特点:在页面源代码中看不到数据...原创 2021-05-09 19:49:06 · 110 阅读 · 0 评论