Why do I get a recursion error with BeautifulSoup and IDLE?

后端 未结 1 755
暖寄归人
暖寄归人 2020-11-28 16:27

I am following a tutorial to try to learn how to use BeautifulSoup. I am trying to remove names from the urls on a html page I downloaded. I have it working great to this po

相关标签:
1条回答
  • 2020-11-28 17:26

    This is a buggy interaction between IDLE and BeautifulSoup's NavigableString objects (which subclass unicode). See issue 1757057; it's been around for a while.

    The work-around is to convert the object to a plain unicode value first:

    print unicode(names)
    
    0 讨论(0)
提交回复
热议问题