Closed fanqingwen closed 5 years ago
您好 我是Android开发的 不太懂php 看了您的PHP源码 想写一份java 的 按照理解的思路是: 先去解析html 获取的itemId就是awemeId 获取时间戳 = time 时间戳+139 = _rticket 请求头: .addHeader("Accept-Encoding", "utf-8") .addHeader("User-Agent", "okhttp/3.10.0.1");
然后去请求接口 api+time+_rticket 可是我返回的json是不对的 研究了一下午 没有找到那里有问题
还请指教
### 下面我是拼出来的地址: https://api-hl.amemv.com/aweme/v1/aweme/detail/?retry_type=no_retry&iid=43619087057&device_id=57318346369&ac=wifi&channel=update&aid=1128&app_name=aweme&version_code=251&version_name=2.5.1&device_platform=android&ssmix=a&device_type=MI+8&device_brand=xiaomi&language=zh&os_api=22&os_version=5.1.1&uuid=865166029463703&openudid=ec6d541a2f7350cd&manifest_version_code=251&resolution=1080*1920&dpi=480&update_version_code=2512&as=a115996edcf39c7adf4355&cp=9038c058c7f6e4ace1IcQg&mas=01af833c02eb8913ecc7909389749e6d89acaccc2c662686ecc69c&aweme_id=6699755431717244172&ts=1560242852080&rticket=1560242852219
### 下面是我返回的json: {"status_code":0,"aweme_detail":{"video":{"ratio":"720p","play_addr":{"url_list":[]},"height":1024,"width":576,"bit_rate":[{"bit_rate":2053004,"gear_name":"normal","quality_type":0}],"download_addr":{"url_list":[],"uri":""},"has_watermark":true,"play_addr_lowbr":{"url_list":[],"uri":""},"dynamic_cover":{"url_list":[],"uri":""}},"video_labels":[],"is_vr":false,"vr_type":0,"statistics":{"play_count":1300405217,"comment_count":343735703,"share_count":591234323,"digg_count":454542222},"author":{},"music":{"status":1,"extra":"{\"has_edited\": 0}","is_original":false,"offline_desc":"","audio_track":{"url_list":[]},"play_url":{"url_list":[]},"effects_data":{"url_list":[]}},"status":{"with_goods":false,"is_delete":false,"private_status":0,"with_fusion_goods":false,"allow_comment":true,"allow_share":true,"is_private":false},"video_text":[],"is_top":0,"aweme_type":0,"geofencing":[],"region":"CN","is_pgcshow":false,"is_relieve":false,"text_extra":[{"at_user_type":"","type":0}],"cha_list":[]}}
文档里的地址过期了,需要重新抓取
您好 我是Android开发的 不太懂php 看了您的PHP源码 想写一份java 的 按照理解的思路是: 先去解析html 获取的itemId就是awemeId 获取时间戳 = time 时间戳+139 = _rticket
请求头: .addHeader("Accept-Encoding", "utf-8") .addHeader("User-Agent", "okhttp/3.10.0.1");
然后去请求接口 api+time+_rticket
可是我返回的json是不对的 研究了一下午 没有找到那里有问题
还请指教
### 下面我是拼出来的地址: https://api-hl.amemv.com/aweme/v1/aweme/detail/?retry_type=no_retry&iid=43619087057&device_id=57318346369&ac=wifi&channel=update&aid=1128&app_name=aweme&version_code=251&version_name=2.5.1&device_platform=android&ssmix=a&device_type=MI+8&device_brand=xiaomi&language=zh&os_api=22&os_version=5.1.1&uuid=865166029463703&openudid=ec6d541a2f7350cd&manifest_version_code=251&resolution=1080*1920&dpi=480&update_version_code=2512&as=a115996edcf39c7adf4355&cp=9038c058c7f6e4ace1IcQg&mas=01af833c02eb8913ecc7909389749e6d89acaccc2c662686ecc69c&aweme_id=6699755431717244172&ts=1560242852080&rticket=1560242852219
### 下面是我返回的json: {"status_code":0,"aweme_detail":{"video":{"ratio":"720p","play_addr":{"url_list":[]},"height":1024,"width":576,"bit_rate":[{"bit_rate":2053004,"gear_name":"normal","quality_type":0}],"download_addr":{"url_list":[],"uri":""},"has_watermark":true,"play_addr_lowbr":{"url_list":[],"uri":""},"dynamic_cover":{"url_list":[],"uri":""}},"video_labels":[],"is_vr":false,"vr_type":0,"statistics":{"play_count":1300405217,"comment_count":343735703,"share_count":591234323,"digg_count":454542222},"author":{},"music":{"status":1,"extra":"{\"has_edited\": 0}","is_original":false,"offline_desc":"","audio_track":{"url_list":[]},"play_url":{"url_list":[]},"effects_data":{"url_list":[]}},"status":{"with_goods":false,"is_delete":false,"private_status":0,"with_fusion_goods":false,"allow_comment":true,"allow_share":true,"is_private":false},"video_text":[],"is_top":0,"aweme_type":0,"geofencing":[],"region":"CN","is_pgcshow":false,"is_relieve":false,"text_extra":[{"at_user_type":"","type":0}],"cha_list":[]}}