Open dewey opened 10 years ago
@dewey preset cookies works for this, but if you can provide what I need to send to login.php, happy to fix.
I'm using the Cookie method right now but it looks like the CF cookies are expiring after each week and you'll have to add new ones (according to the BTN thread).
I asked a BTN Staffer and he just replied, maybe that's something you could use to work around that issue.
Via PM from a BTN TV Technician:
If you look at the torrent download links, you'll see something like this: torrents.php?action=download&id=&authkey=&torrent_pass=
$1 is the numerical torrent ID that is pulled from the channel. $2 and $3 are random, alphanumerical strings that are fixed for each users and are needed to download files without being logged in. Those strings usually don't change, meaning if the program has fields to input them and sends them in the get request, you won't have to log in.
I'm going to look into this a bit. Authkey and Torrentpass are available from any download link, as well as the RSS feed. They're not hard to find, I wonder how hard they'll be to implement though.
FWIW just adding the following to your custom.conf
will fix the issue. This is also how autodl-irssi does it. You can retrieve these two values by looking at the [DL] link on a random torrent.
[broadcasthenet]
downloadURL: https://broadcasthe.net/torrents.php?action=download&authkey=yourauthkey&torrent_pass=yourtorrentpasskey&id=
Ah, perfect. I hadn't thought of reordering it so the ID was last. You're a hero!
If the CF DDoS protection is enabled on BTN the bot is unable to login and snatch the torrents.
"pywhatauto needs to login to snatch the torrents. It doesn't handle the CF browser check very well and should be considered essentially non-functional at the moment."
"You can work around it by using authkeys - like autodl|irssi does. But that is something the developer(s) of pywhatauto have to implement. There's nothing I can think off to make pywhat working properly as long as the DDoS protection is activated."