Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共3 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:根据短链接获取长连接

1楼
lxhmax 发表于:2024/3/23 17:14:00
这个是开发文档的地址: 验券准备_生活服务商家应用_抖音开放平台 (open-douyin.com)

  1. 二维码扫出来是一个短链,示例:https://v.douyin.com/eHHc1ft/ ,扫码后并调用本接口可返回当前订单下可用的全部券码信息,如未返回券码信息,则说明该订单此刻无可用券码。
  2. 对短链做 HTTP 请求。得到对应的长链接是https://www.iesdouyin.com/share/commerce/coupon/I0ZwZEZpb2U1N0pjQVZxS2NJRTFSQW5WK1c4bmxvbnNWdUQ2Wk85Y1N0eHpRUFpMMmZwNTdFM2NKeWlFNDM2QT0/?schema_type=13&object_id=I0ZwZEZpb2U1N0pjQVZxS2NJRTFSQW5WK1c4bmxvbnNWdUQ2Wk85Y1N0eHpRUFpMMmZwNTdFM2NKeWlFNDM2QT0&utm_campaign=client_scan_share&app=aweme&utm_medium=ios&tt_from=scan_share&iid=&utm_source=scan_share

老师,访问https://v.douyin.com/eHHc1ft/会跳转到长链接,我应该如何获得这个场链接,下面的代码返回404错误
Dim hc As New HttpClient("https://v.douyin.com/eHHc1ft/")
Dim ret As String = hc.GetData()
Output.Show(ret)
2楼
有点蓝 发表于:2024/3/23 17:59:00
Dim url As String = "https://v.douyin.com/eHHc1ft/"
Dim rqst As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url)
rqst.AllowAutoRedirect = False
Dim rsps As System.Net.HttpWebResponse = rqst.GetResponse
output.show(rsps.Headers("Location"))
rsps.Close
3楼
lxhmax 发表于:2024/3/23 18:10:00
谢谢老师
共3 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .01855 s, 2 queries.