📅  最后修改于: 2022-03-11 14:45:57.948000             🧑  作者: Mango
import requests
from bs4 import BeautifulSoup as bs
github_avatar = input('Input git user: ')
url = 'https://github.com/'+ github_avatar
r = requests.get(url)
soup = bs(r.text, 'html.parser')
profile_image = soup.find('img', {'alt' : 'Avatar'})['src']
# print(url)
print(profile_image)