How does BeautifulSoup's ResultSet, traverse everything?

destination page https://www.w3cschool.cn/code.

this is crawling html

def getHtml(url):
    re = requests.get(url)
    return re.text
index = getHtml(url)
index

this is the method for parsing html

def parseHtml(html):
    soup = BeautifulSoup(index,"html.parser")
    -sharpsoup
    lessonList= soup.find("div",class_="codecamplist-catalog").find_all("a")
    return lessonList
lessonList = parseHtml(index)
lessonList

the final lessonList is in bs4.element.ResultSet format

[<a href="//www.w3cschool.cn/codecamp/say-hello-to-html-element.html" title="Say Hello to HTML Element">
 <i class="icon-codecamp-list icon-codecamp-option"></i>
 HTML</a>,
 <a href="//www.w3cschool.cn/codecamp/headline-with-the-h2-element.html" title="Headline with the h2 Element">
 <i class="icon-codecamp-list icon-codecamp-option"></i>
 HTML h2</a>,
 <a href="//www.w3cschool.cn/codecamp/inform-with-the-paragraph-element.html" title="Inform with the Paragraph Element">
 <i class="icon-codecamp-list icon-codecamp-option"></i>
 HTML p</a>,
 <a href="//www.w3cschool.cn/codecamp/uncomment-html.html" title="Uncomment HTML">
 <i class="icon-codecamp-list icon-codecamp-option"></i>
 HTML</a>]

how to parse data in this format
goal is to save the links and title in csv format

only the first one can be found for the corresponding data in Tag format, and an error will be reported if you use the Find_all method.

def getLesson(lessonList):
    for i in lessonList:
        lesson={}
        try:
            lesson["title"] = i.find("a")["href"].lstrip("//")
            lesson["name"]= i.find("a")["title"]
        except:
            print("error")
    return lesson
getLesson(lessonList)
-sharp   lessonList= soup.find_all("div",class_="codecamplist-catalog")
-sharp  .find_all("a") 

result

{"name": "Say Hello to HTML Element",
 "title": "www.w3cschool.cn/codecamp/say-hello-to-html-element.html"}
Sep.16,2021

def parseHtml(html):
    soup = BeautifulSoup(html,'lxml')
    -sharp lessonList = soup.find('div',class_='codecamplist-catalog').find('ul').find_all('a')
    -sharp lessonList = soup.find_all('div',class_='codecamplist-catalog')[0].find_all('ul')[0].find_all('a')
    lessonList= soup.select('div.codecamplist-catalog a')
    for item in lessonList:
        yield {item['href']:item['title']}

all three ways are fine, but with comments.

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