2

I tried this:

print(type(list(soup.children)[0])) 

but the output I get includes the word 'class' Output: [<class 'bs4.element.Tag'>]

I'd like it to only show me 'bs4.element.Tag', just like if I wrote in the command line:

type(list(soup.children)[0]) 

Output: bs4.element.Tag

2
  • @Aran-Fey: I think you accidentally edited out a part that wasn't displaying because it was in <>. Commented May 2, 2018 at 7:30
  • @user2357112 Oh, you're right. Thanks for the heads up. Commented May 2, 2018 at 7:32

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.