【发布时间】:2021-06-13 19:18:08
【问题描述】:
我有以下代码,该代码从 Redbubble 等网站抓取了一些数据。有时我会刮很多数据,想知道代码中的实时进度……我尝试了进度条模块,但没有得到我想要的……
import requests
from bs4 import BeautifulSoup
re = requests.get('https://www.redbubble.com/i/iphone-case/What-A-Time-To-Be-Alive-by-DinoMike/36490886.RIOBD')
src = re.content
soup = BeautifulSoup(src, "html.parser")
tags = soup.find_all("span", {"class" : "styles__children--21o3C"})
print(tags)
【问题讨论】:
-
从您的代码中可以看出,您只执行一个请求。是不是需要超过半秒的时间?
-
这个请求只是一个例子
标签: python python-3.x progress-bar