Python: BeautifulSoup - Get an attribute value from the name of a class

后端 未结 1 1936
春和景丽
春和景丽 2021-01-01 06:54

I am scraping items from a webpage (there are multiple of these):



        
相关标签:
1条回答
  • 2021-01-01 07:46

    You are not iterating through the links list. Try this.

    links = soup.find_all("a", class_="iusc")
    
    for link in links:
        print(link.get('m'))
    
    0 讨论(0)
提交回复
热议问题