Python加速请求

我正在创建一个小的python脚本,以通过用户名查找网站,论坛等页面,您可以轻松理解它。我将使用请求,但是在一次搜索和另一次搜索之间确实非常慢。您有什么建议的解决方案吗?提前致谢。

import requests
from printy import printy, inputy

username = inputy("[?] Username: ", "b")



fivehundredpx = requests.get('https://www.500px.com/'+ username)

if fivehundredpx.status_code == 200:
    printy('500px Found: https://www.500px.com/'+ username, "n")
elif fivehundredpx.status_code == 404:
    printy('500px Not Found', "r")



sevencups = requests.get('https://www.7cups.com/@'+ username)

if sevencups.status_code == 200:
    printy('7Cups Found: https://www.7cups.com/@'+ username, "n")
elif sevencups.status_code == 404:
    printy('7Cups Not Found', "r")
评论