fix bug where not checking for attrs != nil
This commit is contained in:
4
main.nim
4
main.nim
@@ -10,7 +10,7 @@ var html: string
|
||||
#var node: XmlNode
|
||||
|
||||
echo "URL:"
|
||||
var url: string = readLine(stdin)
|
||||
var url: string = "https://www.comparis.ch/immobilien/marktplatz/lenzburg/mieten"#readLine(stdin)
|
||||
echo "given url is: ",url
|
||||
|
||||
try:
|
||||
@@ -20,7 +20,7 @@ try:
|
||||
var htmlnode: XmlNode
|
||||
var entry : Entry
|
||||
|
||||
add(entry.desc,Descriptor(name : "", html_context_tag : "div",html_context_attrs : "class",html_context_key : "css-1d60yla ehesakb4", html_tag : "a",attrs : "href"))
|
||||
add(entry.desc,Descriptor(name : "test", html_context_tag : "div",html_context_attrs : "class",html_context_key : "css-1wvv8q", html_tag : "a",aattrs : "href"))
|
||||
#add(entry.desc,Descriptor(name:"key_and_string_search",contains_string: "a",html_context_tag : "div", html_tag : "a",attrs : "href"))
|
||||
|
||||
echo entry
|
||||
|
||||
Reference in New Issue
Block a user