[python rookie] encountered a problem when writing a simple crawler and could not collect the desired tag

code is shown in the figure:

-sharp -*- coding:utf-8 -*-
import webbrowser
import pyperclip
import sys
import bs4
import requests

search_target = pyperclip.copy("kkkk")
if len(sys.argv) > 1:
     search_target = " ".join(sys.argv[1:])
else:
    search_target = pyperclip.paste()

res_temp = "http://www.baidu.com/s?wd=" + search_target
webbrowser.open(res_temp)

res = requests.get(res_temp)
bsObj = bs4.BeautifulSoup(res.text, "html.parser")
print(bsObj)
-sharph3 = bsObj.findAll("h3", {"class":"t"}) 
-sharpprint(h3)



print("---1---")
div = bsObj.findAll("div", {"class":"result c-container "}) 
print(div)
print("---2---")
h3 = div.findAll("h3",{"class":"t"})
print(h3)
print("---3---")

the running result is as follows:

clipboard.png

:



divh3
:

clipboard.png
H3 is already a sub-tag under the div tag, so why can it be collected by div but not by H3?

Mar.03,2021

because here div=bsObj.findAll ('div', {' class': 'result c talk container'})

<a data-click="{
                        'F':'778317EA',
...
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3888c-2c115.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3888c-2c115.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?