Python启动迅雷下载

Posted TopCoderのZeze

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Python启动迅雷下载相关的知识,希望对你有一定的参考价值。

 

import subprocess
import base64
thunder_path = ‘E:\Thunder\Program\Thunder.exe‘
def Url2Thunder(url):
    url = ‘AA‘ + url + ‘ZZ‘
    url = base64.b64encode(url.encode(‘ascii‘))
    url = b‘thunder://‘ + url
    thunder_url = url.decode()
    return thunder_url


def download_with_thunder(file_url):
    thunder_url = Url2Thunder(file_url)
    subprocess.call([thunder_path, thunder_url])

  

以上是关于Python启动迅雷下载的主要内容,如果未能解决你的问题,请参考以下文章