Foxtable(狐表)用户栏目专家坐堂 → 关于网站代码的问题请教


  共有2210人关注过本帖树形打印复制链接

主题:关于网站代码的问题请教

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2017/11/22 12:14:00 [显示全部帖子]

mark 模拟请求

 

Dim body As String = "on=true&page=5&pageSize=15&productName=&conditionType=1&applyname=&applysn="
Dim req = System.Net.WebRequest.Create("http://125.35.6.80:8080/ftba/itownet/fwAction.do?method=getBaNewInfoPage")
req.Method = "POST"
req.ContentType = "application/x-www-form-urlencoded"
req.UserAgent = "Mozilla/5.0 (Windows NT 6.3; rv:57.0) Gecko/20100101 Firefox/57.0"
Dim aryBuf As Byte() = Encoding.UTF8.GetBytes(body)
req.ContentLength = aryBuf.Length
Dim writer = req.GetRequestStream()
writer.Write(aryBuf, 0, aryBuf.Length)
writer.Close()
writer.Dispose()
Dim pos = req.GetResponse

Dim stm As System.IO.Stream = pos.GetResponseStream()
Dim reader As New System.IO.StreamReader(stm)
Dim str As String = reader.ReadToEnd
pos.Close
stm.Close
reader.close

msgbox(str)
Dim jo As JObject = Jobject.Parse(str)
msgbox(jo.ToString)
For Each o As JObject In jo("list")
    output.show(o.tostring)
    output.show(o("applySn"))
next


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2017/11/22 15:56:00 [显示全部帖子]

1、连接是根据id值得到的,id值在你的数据里面,如

 

http://125.35.6.80:8080/ftba/itownet/hzp_ba/fw/pz.jsp?processid=201710311023423jvoh

 

2、如果想学基础,可以买一本vb.net或者c#的书籍来学习。


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2017/11/22 16:12:00 [显示全部帖子]

使用浏览器的调试功能(F12),查找得到访问的地址

 

Dim body As String = "processid=201710311023423jvoh"
Dim req = System.Net.WebRequest.Create("http://125.35.6.80:8080/ftba/itownet/fwAction.do?method=getBaInfo")
req.Method = "POST"
req.ContentType = "application/x-www-form-urlencoded"
req.UserAgent = "Mozilla/5.0 (Windows NT 6.3; rv:57.0) Gecko/20100101 Firefox/57.0"
Dim aryBuf As Byte() = Encoding.UTF8.GetBytes(body)
req.ContentLength = aryBuf.Length
Dim writer = req.GetRequestStream()
writer.Write(aryBuf, 0, aryBuf.Length)
writer.Close()
writer.Dispose()
Dim pos = req.GetResponse

Dim stm As System.IO.Stream = pos.GetResponseStream()
Dim reader As New System.IO.StreamReader(stm)
Dim str As String = reader.ReadToEnd
pos.Close
stm.Close
reader.close

msgbox(str)
Dim jo As JObject = Jobject.Parse(str)
msgbox(jo.ToString)


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2017/11/24 15:12:00 [显示全部帖子]

Dim body As String = "processid=20140612144640ouc8z"
Dim req = System.Net.WebRequest.Create("http://125.35.6.80:8080/ftba/itownet/fwAction.do?method=getBaInfo")
req.Method = "POST"
req.ContentType = "application/x-www-form-urlencoded"
req.UserAgent = "Mozilla/5.0 (Windows NT 6.3; rv:57.0) Gecko/20100101 Firefox/57.0"
Dim aryBuf As Byte() = Encoding.UTF8.GetBytes(body)
req.ContentLength = aryBuf.Length
Dim writer = req.GetRequestStream()
writer.Write(aryBuf, 0, aryBuf.Length)
writer.Close()
writer.Dispose()
Dim pos = req.GetResponse

Dim stm As System.IO.Stream = pos.GetResponseStream()
Dim reader As New System.IO.StreamReader(stm)
Dim str As String = reader.ReadToEnd
pos.Close
stm.Close
reader.close

Dim jo As JObject = Jobject.Parse(str)
output.show(jo.ToString)
msgbox(jo("provinceConfirm"))


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2017/11/28 10:05:00 [显示全部帖子]

报什么错?截图说明。即便没有,都不至于报错的。

 

 

Dim jo As JObject = Jobject.Parse(str)
output.show(jo.ToString)
msgbox(jo("aabbcc"))
If jo("aabbcc") Is Nothing Then
    msgbox("没有值")
End If


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  6楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2017/12/14 17:47:00 [显示全部帖子]

Dim str = "韩姿妤水动力保湿菁萃套装——水动力水嫩原液"
msgbox(HTMLDecode(str))

 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  7楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2017/12/24 15:15:00 [显示全部帖子]

1、不要频繁访问;不要过快访问。人家的网站有可能有限制,限制了你这个ip的访问;

 

2、读取不到数据的话,你就不要转换成json,不然就会报错。


 回到顶部