Jump to content

what am i overlooking


G+_Rud Dog
 Share

Recommended Posts

what am i overlooking

 

>>> import bs4

>>> exampleFile = open('example.html')

>>> exampleSoup = bs4.BeautifulSoup(exampleFile.read())

>>> elems = exampleSoup.select('#author')

>>> type(elems)

>>> len(elems)

0

>>> type(elems[0])

Traceback (most recent call last):

  File "", line 1, in

    type(elems[0])

IndexError: list index out of range

Link to comment
Share on other sites

 Share

×
×
  • Create New...