标签:src cep tps inpu ica 编码 1.2 items compile
一、准备下载越狱版本抖音App
一般下载越狱版本App要不从越狱手机上Crack 正版App,另外一种从PP助手或者越狱市场进行下载,这里选择第二种方式
感谢 http://iosre.com/t/pp-ipa/11589 提供的代码,这里使用一段python3脚本进行搜索下载
脚本如下:
import urllib.request import urllib.parse import re import ssl import base64 #关闭SSL验证 user_agent = ‘Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)‘ headers = { ‘User-Agent‘ : user_agent } ssl._create_default_https_context = ssl._create_unverified_context print("Close certificate verify...") def getSearchResult(): keyword = input("Input the search key word: ") #将中文转换成url编码 keyword = urllib.parse.quote(keyword) searchUrl = "https://www.25pp.com/ios/search_app_0/" + keyword + "/" content = getHtmlStringByUrl(searchUrl) detailUrl = getSearchDetailUrl(content) content = getHtmlStringByUrl(detailUrl) downUrl = getAppdownUrlByHtmlContent(content) return downUrl # 根据url 获取网页内容 def getHtmlStringByUrl(url): try: request = urllib.request.Request(url, headers=headers) response = urllib.request.urlopen(request) content = response.read().decode(‘utf-8‘) # gbk return content except urllib.request.URLError as e: if hasattr(e, "code"): print(e.code) if hasattr(e, "reason"): print(e.reason) return "" # 根据网页内容获取详情链接 def getSearchDetailUrl(content): pattern = re.compile(‘href="https://www.25pp.com/ios/detail_.*?"‘, re.S) #href = "https://www.25pp.com/ios/detail_3491226/" items = re.findall(pattern, content) for item in items: #print(item) values = item.split(‘"‘) result = values[1] print("Detail url: " + result) return result return "" # 根据网页内容获取ipa的下载链接 def getAppdownUrlByHtmlContent(content): pattern = re.compile(‘appdownurl=".*?"‘, re.S) # appdownurl="aHR0cDovL3IxMS4yNXBwLmNvbS9zb2Z0LzIwMTgvMDEvMDkvMjAxODAxMDlfNjI0NThfMjE1MDYwOTY4Nzc4LmlwYQ==" items = re.findall(pattern, content) for item in items: values = item.split(‘"‘) result = values[1] print("Orgin download url: " + result) # Base64Decode output = base64.standard_b64decode(result) output = output.__str__() return output return "" downUrl = getSearchResult() print("Down url: " + downUrl)
下载结果:
Close certificate verify... Input the search key word: 抖音 Detail url: https://www.25pp.com/ios/detail_3306009/ Orgin download url: aHR0cDovL3IxMS4yNXBwLmNvbS9zb2Z0LzIwMTgvMDYvMjAvMjAxODA2MjBfNTU4MDJfMjMwNzAxNzk3OTIzLmlwYQ== Down url: b‘http://r11.25pp.com/soft/2018/06/20/20180620_55802_230701797923.ipa‘
使用浏览器下载抖音App
总结:
抖音App作为短视频的标杆产品,具有观看短视频、录制短视频的能力,对于学习其代码架构有参考价值。
标签:src cep tps inpu ica 编码 1.2 items compile
原文地址:https://www.cnblogs.com/doudouyoutang/p/9237958.html