Greetings dear members!
I have a script that autodownload torrent-files from torrent-tracker. The tracker has announce channel, all new torrents are published there. The tracker moved to https recently, instead of http. After that torrent-files are downloaded with such containment:
Code
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.18.0</center>
</body>
</html>

Could anyone give me some instructions how to update this script to https-version?
The listing is below
alias -l tt.loadconf {
; These are the categories you want
%tt.wanted = Singles - House, Singles - Techno
; And anything in the name you don't
%tt.unwanted = UKHx, TALiON, DWM, FMT, FLAC, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, WAV, LOSSLESS
; Get everything from an uploader
%tt.seeder =

; Directory to save .torrents
%tt.dir = C:\AA-uTorrent\Store\TT\
; Your TT passkey
%tt.passkey =
}

on *:TEXT:*:#TranceTraffic:{
if (($network == P2P-NET) && ($nick == TranceTraffic)) {
if ($1 == Name....:) { %tt.name = $2- }
if ($1 == Uploader:) { %tt.uploader = $2- }
if ($1 == Category:) { %tt.category = $2- }
if ($1 == URL.....:) {
%tt.url = $2-
tt.loadconf
if ((($tt.isin(%tt.wanted,%tt.category)) && (!$tt.isin(%tt.unwanted,%tt.name))) || ($tt.isin(%tt.seeder,%tt.uploader))) {
if ($regex(%tt.url,id=(\d+))) { %tt.id = $regml(1) }
%tt.file = $replace(%tt.name,$chr(32),_) $+ .torrent
sockopen tt www.trancetraffic.com 80
}
else { unset %tt.* }
}
}
}
alias -l tt.isin {
if ($2 isin $1) { return $true }
var %i = 1
while (%i <= $numtok($1,44)) {
if (($gettok($1,%i,44) isin $2) || ($gettok($1,%i,44) iswm $2)) { return $true }
inc %i
}
return $false
}

on *:sockopen:tt:{
if ($sockerr) { return }
sockwrite -n $sockname GET $+(/download.php/,%tt.id,/,%tt.file,?passkey=,%tt.passkey) HTTP/1.1
sockwrite -n $sockname Host: $+($sock($sockname).addr,:,$sock($sockname).port)
sockwrite -n $sockname Connection: Close
sockwrite -n $sockname $crlf
}
on *:sockread:tt:{
if ($sockerr) { return }
if (!$sock($sockname).mark) {
var %sockhead
sockread %sockhead
if (%sockhead == $null) { sockmark $sockname 1 }
}
else {
sockread &torrent
while ($sockbr != 0) {
bwrite $qt(%tt.dir $+ %tt.file) -1 -1 &torrent
sockread &torrent
}
}
}
on *:sockclose:tt:{
run $qt(%tt.dir $+ %tt.file)
unset %tt.*
}