The code is as follows :
from selenium import webdriver
from selenium.webdriver.common.by import By
driver=webdriver.Chrome()
driver.get("https://music.163.com/#/discover/toplist%22)
driver.switch_to.frame("contentFrame")
li = driver.find_elements(by=By.TAG_NAME, value="tr")
for t in li:
list1 = t.find_elements(by=By.TAG_NAME, value='span')
for s in list1:
if s.get_attribute("class") == "ico u-icn u-icn-73 s-fc9":
#( Questions as follows )
# songn = t.find_element_by_tag_name("b").get_attribute("title")# Report errors : Object has no property value
# songn = t.find_elements(by=By.TAG_NAME, value="b").get_attribute("title") # If it's changed to this, it won't work
songn = t.find_elements(by=By.TAG_NAME, value="b")#.getattribute("title")
# singer = t.find_element_by_class_name("text").get_attribute("title") singer = t.find_elements(by=By.CLASS_NAME, value="text")#.__getattribute__("title") print(f" song :《{songn}》 singer :{singer}")