利用list來判斷!
from selenium import webdriver
# 連接配接資料庫kugou.song.db
client = MongoClient()
collection = client["kugou"]["song"]
# 查找歌手資訊
name= "XXX"
songer = collection.find({"songer_name":name})
if list(songer) == [ ] :
songer 就沒有找到name="xxxx"
else:
list(songer) 傳回的是[{}}非空清單