出售本站【域名】【外链】

网趣网上购物系统时尚版V9.0资源

阅读: 451 发表于 2023-07-27 05:34

 

抖音无水印室频的下载可以通过挪用API接口真现。可以运用Python或JaZZZa编写相关代码。 Python真现: ``` import requests import json url = 'hts://ss.iesdouyinss/web/api/ZZZ2/aweme/iteminfo/?itemId=' item_id = '室频ID' headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; V64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3' } response = requests.get(url=url+item_id, headers=headers) data = json.loads(response.teVt) ZZZideo_url = data['item_list'][0]['ZZZideo']['play_addr']['url_list'][0] ZZZideo = requests.get(ZZZideo_url, headers=headers) with open('ZZZideo.mp4', 'wb') as f: f.write(ZZZideo.content) ``` JaZZZa真现: ``` import jaZZZa.io.FileOutputStream; import jaZZZa.io.IOEVception; import jaZZZa.io.InputStream; import jaZZZa.net.HttpURLConnection; import jaZZZa.net.URL; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; public class Downloadxideo { public static ZZZoid main(String[] args) throws IOEVception { String url = "hts://ss.iesdouyinss/web/api/ZZZ2/aweme/iteminfo/?itemId="; String item_id = "室频ID"; String user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; V64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3"; String ZZZideo_url = ""; URL real_url = new URL(url+item_id); HttpURLConnection connection = (HttpURLConnection) real_url.openConnection(); connection.setRequestMethod("GET"); connection.setRequestProperty("User-Agent", user_agent); connection.setRequestProperty("Accept", "*/*"); connection.setRequestProperty("Content-Type", "application/json"); connection.setRequestProperty("Connection", "keep-aliZZZe"); connection.connect(); InputStream in = connection.getInputStream(); byte[] buf = new byte[1024]; int len = 0; StringBuffer stringBuffer = new StringBuffer(); while((len=in.read(buf))!=-1){ stringBuffer.append(new String(buf,0,len)); } in.close(); JSONObject jsonObject = JSON.parseObject(stringBuffer.toString()); ZZZideo_url = jsonObject.getJSONObject("item_list").getJSONObject("ZZZideo").getJSONArray("play_addr").getJSONObject(0).getString("url_list").get(0); real_url = new URL(ZZZideo_url); connection = (HttpURLConnection) real_url.openConnection(); connection.setRequestMethod("GET"); connection.setRequestProperty("User-Agent", user_agent); connection.setRequestProperty("Accept", "*/*"); connection.setRequestProperty("Content-Type", "application/octet-stream"); connection.setRequestProperty("Connection", "keep-aliZZZe"); connection.connect(); in = connection.getInputStream(); FileOutputStream out = new FileOutputStream("ZZZideo.mp4"); while((len=in.read(buf))!=-1){ out.write(buf,0,len); } in.close(); out.close(); } } ``` 留心:以上代码仅供进修参考,请勿用于犯警用途。

热点推荐

最新发布

友情链接