Problems with python3 BeautifulSoup

from collections import Counter
import requests
from bs4 import BeautifulSoup
from urllib import request
import urllib
url = "http://www.baidu.com.cn/s?wd=" + urllib.parse.quote("BeautifulSoup") + "&pn="  -sharp wordpn..
headers = {    
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36",    
"Connection": "keep-alive",       
"accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8"}

r=requests.get(url,headers=headers)
soup = BeautifulSoup(r.text.replace("<b>", "").replace("</b>", ""),"lxml")
print(soup.find(id="3").find("a", "c-showurl").string)
-sharpfor i in range(1, 11):
-sharp    print(soup.find(id=i).find("a", "c-showurl").string)

the problem is mainly in the last three lines. If find (id= "3") is fine, find (id=i) will report an error. How to solve it?
there is another question, that is, why the search results obtained through python are different from those found by computers?

Mar.28,2021

the first question. Id= "3" is str,id=i or int,. Of course, change it to id=str (i)
. The second question is whether the page has data loaded by js. Do you want to get this


url:url = 'https://www.baidu.com.cn/s?wd=' + urllib.parse.quote('python3') + '&pn='

python.org/" rel="nofollow noreferrer">https://www.python.org/
www.runoob.com/python3...
https://www.liaoxuefeng.com/w...
python.org/downloads" rel="nofollow noreferrer">https://www.python.org/downloads
www.runoob.com/python3...
www.runoob.com/python3...
https://jecvay.com/category/s...
python.org/downloa..." rel="nofollow noreferrer">https://www.python.org/downlo...
python.org/" rel="nofollow noreferrer">https://docs.python.org/
python3..." rel="nofollow noreferrer">https://www.yiibai.com/python...
url:python3&rsv_spt=1&rsv_iqid=0x95f7407300004bbb&issp=1&f=8&rsv_bp=0&rsv_idx=2&ie=utf-8&tn=baiduhome_pg&rsv_enter=1&rsv_sug3=8&rsv_sug1=5&rsv_sug7=100&rsv_sug2=0&inputT=2062&rsv_sug4=2989" rel="nofollow noreferrer">https://www.baidu.com/s?wd=py...

:
python.org/" rel="nofollow noreferrer">https://www.python.org/
www.runoob.com/python3...
https://www.liaoxuefeng.com/w...
www.runoob.com/python3...
https://jecvay.com/category/s...
www.runoob.com/python3...
python.org/downloads" rel="nofollow noreferrer">https://www.python.org/downloads
python.org/downloa..." rel="nofollow noreferrer">https://www.python.org/downlo...
python3..." rel="nofollow noreferrer">https://www.yiibai.com/python...
python.org/" rel="nofollow noreferrer">https://docs.python.org/


?
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-7b36f2-8463.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-7b36f2-8463.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?