Open GarryGaller opened 8 years ago
let htmldoc =""" <html> <body> <a href="12345.txt">12345.txt</a> <a href="12346.txt">12346.txt</a> <a href="12347">12347</a> </body> </html> """ echo q(htmldoc).select("a[href=12345.txt]") #output: @[<a href="12345.txt">12345.txt</a>, <a href="12346.txt">12346.txt</a>, <a href="12347">12347</a>] let htmldoc2 =""" <html> <body> <a href="12345">12345</a> <a href="12346">12346</a> <a href="12347">12347</a> </body> </html> """ echo q(htmldoc2).select("a[href=12347]") #output: @[<a href="12345">12345</a>, <a href="12346">12346</a>, <a href="12347">12347</a>] let htmldoc3 =""" <html> <body> <a href="a12345">a12345</a> <a href="a12346">a12346</a> <a href="a12347">a12347</a> </body> </html> """ # Correctly working soon: echo q(htmldoc3).select("a[href=a12347]") #output: @[<a href="a12347">a12347</a>]
I will check this soon, just back home from a long vacation
To anyone, who found this library and wonders if it works: it works