
ImportError: cannot import name "BeatifulSoup4" from "bs4"
Publicado por CRISTIAN OMAR (4 intervenciones) el 24/03/2021 16:38:43
1
2
3
4
5
6
7
8
9
10
11
12
13
#Windows 10 64 bits, python v. 3.9.0
#pip install requests
#pip install bs4, pip install beautifulsoup4
import requests
from bs4 import BeatifulSoup4 as bs
github_user = input('Ingresa tu usario GitHub: ')
url = 'https://github.com/'+github_user
r = requests.get(url)
soup = bs(r.content, 'html.parser')
profile_image = soup.find('img', {'alt' : 'Avatar'})['src']
print(profile_image)
Valora esta pregunta


0