17、soup.select("p[class='story'] a") 查找文档中所...
17、soup.select("p[class='story'] a") 查找文档中所有属性class="story"的
节点下的所有元素节点;
17、soup.select("p[class='story'] a") 查找文档中所有属性class="story"的
节点下的所有元素节点;
第1题
The Dormouse's story
Once upon a time there were three little sisters; and their names were Elsie, Lacie and Tillie; and they lived at the bottom of a well.
...
''' soup=BeautifulSoup(doc,"lxml") ______________________________________ for tag in tags: print(tag["href"]) 结果是: http://example.com/elsie http://example.com/lacie http://example.com/tillie 缺失的语句是:
A、tags=soup.select("pa")
B、tags=soup.select("p[] a")
C、tags=soup.select("p[class]>a")
D、tags=soup.select("p[class='story'] a")
第2题
The Dormouse's story
Once upon a time there were three little sisters; and their names were Elsie, Lacie and Tillie; and they lived at the bottom of a well.
...
''' soup=BeautifulSoup(doc,"lxml") _______________________________ print(tag) 程序结果找到class="story"的
元素,缺失的语句是
A、tag=soup.find("p",attrs={"class":"story"})
B、tag=soup.find("p",attr={"class":"story"})
C、tag=soup.find("p")
D、tag=soup.find("p",class="story")
第3题
A.The prisoner stole the policeman' s notebook and gave it to Mr. Green in return.
B.The prisoner was caught.
C.The prisoner robbed Mr. Green.
D.Mr. Green sent the prisoner to the police station.
第4题
A.The prisoner stole the policeman's notebook and gave it to Mr. Green in return.
B.The prisoner was caught.
C.The prisoner robbed Mr. Green.
D.Mr. Green sent the prisoner to the police station.
第5题
A.The humorous 'story.
B.The witty story.
C.The comic story.
D.Alt three take the same amount of time.
第7题
A.The sea can hardly be trusted even on a fine day.
B.It is not safe for people to go boating in the open sea.
C.People who know the sea well do not like it.
D.Mr. Wilmot wouldn't want to go to the sea any more.
第8题
A.O Henry
B.Flannery O' Connor
C.Henry James
D.Mark Twain
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!