本篇内容主要讲解“Python怎么获取剪映无水印视频”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“Python怎么获取剪映无水印视频”吧!
#!/usr/bin/env python # encoding: utf-8 import requests, urllib, json appId = "" # 开发者后台获得 appSecret = "" # www.videoparse.cn 开发者后台获得 params = { "appid": appId, "appsecret": appSecret, "url":"", } def get(url): params["url"] = url; api_url = "https://api-sv.videoparse.cn/api/video/normalParse?" + urllib.parse.urlencode(params) msg = {"code": 0, "msg": "", "body": ""} response = requests.get(url=api_url, timeout=30) if response.status_code != 200: msg['code'] = 1 msg["msg"] = "请求出现问题" return msg # result = json.loads(response.text) 如果你直接拿到系统中使用请将返回参数直接转为json result = response.text # 如果你不需要转换json,则直接接受数据并返回 return result def post(url): params["url"] = url api_url = "https://api-sv.videoparse.cn/api/video/normalParse" msg = {"code": 0, "msg": "", "body": ""} response = requests.post(url=api_url, data=params, timeout=30) if response.status_code != 200: msg['code'] = 1 msg["msg"] = "请求出现问题" return msg # result = json.loads(response.text) 如果你直接拿到系统中使用请将返回参数直接转为json result = response.text # 如果你不需要转换json,则直接接受数据并返回 return result ##print(get("https://v.douyin.com/JJTDEKL/")) #print(post("https://v.douyin.com/JJTDEKL/"))
到此,相信大家对“Python怎么获取剪映无水印视频”有了更深的了解,不妨来实际操作一番吧!这里是亿速云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!
原创文章,作者:1402239773,如若转载,请注明出处:https://blog.ytso.com/237579.html