1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

examples: replace "resp.text" with "resp.body". (#15123)

This commit is contained in:
SakthiMahendran 2022-07-19 15:22:42 +05:30 committed by GitHub
parent a39fe68af1
commit e4674cb8e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,7 @@ fn main() {
return return
} }
// html.parse() parses and returns the DOM from the given text. // html.parse() parses and returns the DOM from the given text.
mut doc := html.parse(resp.text) mut doc := html.parse(resp.body)
// html.DocumentObjectModel.get_tag_by_attribute_value() retrieves all the tags in the document that has the given attribute name and value. // html.DocumentObjectModel.get_tag_by_attribute_value() retrieves all the tags in the document that has the given attribute name and value.
tags := doc.get_tag_by_attribute_value('class', 'list_article_item') tags := doc.get_tag_by_attribute_value('class', 'list_article_item')
for tag in tags { for tag in tags {