BeautifulSoup: object of type 'Response' has no len()

前端 未结 7 1518
深忆病人
深忆病人 2020-12-05 09:55

Issue: when I try to execute the script, BeautifulSoup(html, ...) gives the error message \"TypeError: object of type \'Response\' has no len(). I tried passing

7条回答
  •  情深已故
    2020-12-05 10:32

    import requests
    from urllib.request import urlopen
    from bs4 import BeautifulSoup
    import re
    
    url = "https://fortnitetracker.com/profile/all/DakshRungta123"
    html = requests.get(url)
    
    soup = BeautifulSoup(html)
    
    
    title = soup.text
    print(title.text)
    

提交回复
热议问题