vb.net - VB.net 与网站交互(没有 WebBrowser)
问题描述
我想知道是否可以在没有 webbrowser 的情况下与该网站进行交互: https ://msoos.github.io/cryptominisat_web
我想用字符串填充编辑器元素,“按”运行,然后从输出元素中获取文本
我试过没有成功:
Dim request As HttpWebRequest = WebRequest.Create("https://msoos.github.io/cryptominisat_web/")
request.Method = "POST"
request.ContentLength = byteData.Length
request.ContentType = "application/x-www-form-urlencoded"
Dim requeststream As Stream = request.GetRequestStream()
requeststream.Write(byteData, 0, byteData.Length)
requeststream.Close()
Dim postresponse As HttpWebResponse = request.GetResponse()
Dim postreqreader As New StreamReader(postresponse.GetResponseStream())
Dim thepage As String = postreqreader.ReadToEnd
TextBoxMain.Text = thepage
解决方案
那个特定的 Web 应用程序在 JavaScript 中在客户端工作。没有服务器可以发送文本。如果您不想使用浏览器,则需要使用独立的 JavaScript 解释器(如 V8 或 SpiderMonkey)并针对页面 JavaScript 的相关位手动设置它。
推荐阅读
- php - 使用 usort 对数组的动态标题进行排序
- java - 按列分组和排序 csv 文件 spark
- c++ - QPlainTextEdit 只为一行设置字体
- c# - 如何在 Visual Studio\Resharper 中添加 .cw 后缀模板,如 IntelliJ 中的 .sout 模板?
- valgrind - callgrind 不分析由解释器语言调用的 C 函数
- batch-file - 使用两个 txt 文件复制和重命名文件
- android - RecyclerView 适配器列表
得到 0 - sql - SQL/PLSQL Oracle 查询:WHERE 语句中的 CASE
- javascript - 为 Angular 项目包装 google-closure-library 变量
- c# - 正则表达式的数值表达