-1
我是新來解析,我需要從網站獲取CSRF令牌來檢查用戶名是否可用。我知道CSRF令牌存儲在前20行左右的網站HTML源代碼中。如何用VB中的HtmlAgilityPack解析這些數據?
<head>
<title>Website</title>
<link href="https://fd8c6a1c31abbcfc87c6-9d6bfcdc55882636852ba868a15bca98.ssl.cf5.rackcdn.com/assets/application-afcd9b96896e2ce19d68b2974eb4eb13.css" media="screen" rel="stylesheet">
<meta charset="utf-8">
<meta content="IE=edge" http-equiv="X-UA-Compatible"
<meta content="name check, username, domain, check username" name="keywords">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
<meta content="yes" name="mobile-web-app-capable">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="Namechk | Username &amp; Domain Availability Search" property="og:title">
<meta content="https://namechk.com/" property="og:url">
<meta content="website" property="og:type">
<meta content="Use Namechk to search for an available username or domain and secure your brand across the internet." property="og:description">
<meta content="https://fd8c6a1c31abbcfc87c6-9d6bfcdc55882636852ba868a15bca98.ssl.cf5.rackcdn.com/assets/logo-full-61eada359058051842c4209ccb16acba.png" property="og:image">
<meta content="en_US" property="og:locale">
<meta content="authenticity_token" name="csrf-param">
<meta content="hVv1hnUD4epiXiojaU2ZjZeRlZfYmoY8Dm6d/h0X3fI=" name="csrf-token">
<link href="https://use.fonticons.com/kits/4e70153b/4e70153b.css" media="all" rel="stylesheet">
<link href="https://use.fonticons.com/kits/48e45036/48e45036.css" media="all" rel="stylesheet">
<script type="text/javascript" src="https://wd-edge.sharethis.com/button/getAllAppDefault.esi?cb=stLight.allDefault&app=all&publisher=8e46a0ce-9473-4683-b2db-c97461495d29&domain=namechk.com"></script>
<style>
.adsbygoogle,
.top-ad {
display: none !important;
}
</style>
<link rel="stylesheet" type="text/css" href="//sd.sharethis.com/disc/css/hoverbuttons.6eab8de2ee93b309873157b6d3f977fe.css">
<script type="text/javascript" src="//sd.sharethis.com/disc/js/hoverbuttons.035267d71d894482eb413e5bea488ff5.js"></script>
<link rel="stylesheet" type="text/css" href="https://ws.sharethis.com/button/css/buttons-secure.css">
<script type="text/javascript" src="https://ssl.google-analytics.com/ga.js"></script>
我需要解析出是CSRF令牌,該令牌,在上述代碼段中,是 「hVv1hnUD4epiXiojaU2ZjZeRlZfYmoY8Dm6d/h0X3fI =」。我想使用HTMLAgilityPack庫來做到這一點。