[Python] [BS4] What am i doing wrong?
AzureScripts (151)

Howdy.

I am trying to grab a picture of a person's Roblox character.
However, it is confusing me.

Code:
character_image = soup.find('span', attrs={'class' : 'thumbnail-span'})
character_img = character_image.find('img')
print(character_img["src"])

When i do print(character_image) it prints out:
<span class="thumbnail-span"></span>
But when i try and look for an image tag, it's a "nonetype".

Any help appreciated.

You are viewing a single comment. View All
malvoliothegood (255)

Please include a link to your repl.