mirror of
https://github.com/NohamR/Ratio.py.git
synced 2025-05-24 00:38:57 +00:00
change to transmission 3.00
This commit is contained in:
parent
ff2e1ad9e9
commit
8b20d63bcb
@ -1,9 +1,9 @@
|
|||||||
import random
|
import random
|
||||||
import string
|
import string
|
||||||
|
|
||||||
class Transmission292():
|
class Transmission300():
|
||||||
def __init__(self, info_hash):
|
def __init__(self, info_hash):
|
||||||
self.name = "Transmission 2.92 (14714)"
|
self.name = "Transmission 3.00"
|
||||||
parameters = {}
|
parameters = {}
|
||||||
# urlencoded 20-byte SHA1 hash of the value of the info key from the Metainfo file
|
# urlencoded 20-byte SHA1 hash of the value of the info key from the Metainfo file
|
||||||
parameters['info_hash'] = info_hash
|
parameters['info_hash'] = info_hash
|
||||||
@ -23,7 +23,7 @@ class Transmission292():
|
|||||||
|
|
||||||
def get_headers(self):
|
def get_headers(self):
|
||||||
headers = {}
|
headers = {}
|
||||||
headers['User-Agent'] = 'Transmission/2.92'
|
headers['User-Agent'] = 'Transmission/3.00'
|
||||||
headers['Accept'] = '*/*'
|
headers['Accept'] = '*/*'
|
||||||
headers['Accept-Encoding'] = 'Accept-Encoding: gzip;q=1.0, deflate, identity'
|
headers['Accept-Encoding'] = 'Accept-Encoding: gzip;q=1.0, deflate, identity'
|
||||||
return headers
|
return headers
|
||||||
@ -51,7 +51,7 @@ class Transmission292():
|
|||||||
def generate_peer_id(self):
|
def generate_peer_id(self):
|
||||||
chars = string.ascii_lowercase + string.digits
|
chars = string.ascii_lowercase + string.digits
|
||||||
rand_id = self.id_generator(chars, 12)
|
rand_id = self.id_generator(chars, 12)
|
||||||
peer_id = "-TR2920-" + rand_id
|
peer_id = "-TR3000-" + rand_id
|
||||||
return peer_id
|
return peer_id
|
||||||
|
|
||||||
def generate_key(self):
|
def generate_key(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user