This article is a mirror article of machine translation, please click here to jump to the original article.

View: 18714|Reply: 0

[Communication] .NET core's parsing component, AngleSharp

[Copy link]
Posted on 2/20/2019 8:55:07 AM | | |
For crawler bags, I believe everyone is very enthusiastic about it for the first time. I am no exception.
So is there such a plugin under asp.net core? The answer is yes.
The hyperlink login is visible.HtmlAgilityPack HTML parsing (thanks to bloggers for their contributions to .net core). But xpath is super disgusting to use.
There was a Jumony under .net beforeThe hyperlink login is visible.(Written by Blog Garden Daniel). Support CSS selection and linq query. It's not too cool. However, .NET Core is not supported. (I tried to migrate .NET Core and found that many classes are not implemented in .NET Core)
Finally, there is a parsing component that supports .NET Core. It is comparable to Jumony, and also supports css selection and linq query. That's AngleSharp.
Create a new project, nuget install AngleSharp. Then the following is simply used:
See no, parse html like jq. I don't believe it if you say it's not good.




Previous:Photo Processing Secrets [PS Tutorial Sharing]
Next:C# using is used in three ways
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com