开启迅雷被举报资源的高速通道

根据网上搜到的方法,将那些步骤直接用下面的python代码完成,成功开启迅雷被举报资源的高速通道:

__author__ = '[email protected]'

import sqlite3

taskdb_path = r"C:\Program Files (x86)\Thunder Network\Thunder\Profiles\TaskDb.dat"
#print(taskdb_path)

taskdb = sqlite3.connect(taskdb_path)
cur=taskdb.cursor()

def get_superspeed_table():
    global cur
    cur.execute("select name from sqlite_master where type='table'")
    for res in cur.fetchall():
        if 'superspeed_1_1' in res[0]:
            return res[0]

superspeed_table = get_superspeed_table()
#print(superspeed_table)

def modify_superspeed_table():
    global taskdb,cur, superspeed_table
    select_script='select LocalTaskId,LocalSubFileIndex,UserData from '+superspeed_table
    #print(select_script)
    cur.execute(select_script)
    rows=cur.fetchall()
    for row in rows:
        data=str(row[2]).replace('509','0')
        update_script='update {} set UserData=? where LocalTaskId=? and LocalSubFileIndex=?'.format(superspeed_table)
        cur.execute(update_script, [buffer(data),str(row[0]),str(row[1])])

    taskdb.commit()

modify_superspeed_table()

使用时,需要事先退出迅雷进程。如果不成功,尝试将代码里的509改成508再试试。我的是509,一次就开启高速通道成功了。如果不行,我也不知道原因,以上只是将网上的手动操作用python代替了而已。


你可能感兴趣的:(开启迅雷被举报资源的高速通道)