码迷,mamicode.com
首页 > 移动开发 > 详细

抖音越狱版本App下载

时间:2018-06-28 13:53:46      阅读:4169      评论:0      收藏:0      [点我收藏+]

标签: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作为短视频的标杆产品,具有观看短视频、录制短视频的能力,对于学习其代码架构有参考价值。

 

 

    

抖音越狱版本App下载

标签:src   cep   tps   inpu   ica   编码   1.2   items   compile   

原文地址:https://www.cnblogs.com/doudouyoutang/p/9237958.html

(1)
(2)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!