weixin_40187983
weixin_40187983
采纳率73.6%
2018-11-02 16:07 阅读 644
已采纳

淘宝的网页字串转换(使用vb.net)

5
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • 已采纳
    caozhy 从今以后生命中的每一秒都属于我爱的人 2018-11-03 02:38
    Imports System.Net
    Imports System.Text.RegularExpressions
    
    Public Class Form1
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Dim http As HttpWebRequest = HttpWebRequest.Create(TextBox1.Text)
            http.Method = "GET"
            http.AllowAutoRedirect = False
            Dim re = http.GetResponse()
            Dim url = re.Headers("Location")
            MsgBox(Regex.Match(url, "(?<=id\=)\d+").Value)
        End Sub
    End Class
    
    

    图片说明

    问题如果解决,请点我回答左上角的采纳,谢谢

    点赞 评论 复制链接分享

相关推荐