Skip to content

Instantly share code, notes, and snippets.

@gmillerd
Created July 29, 2023 14:29
Show Gist options
  • Select an option

  • Save gmillerd/af7e7f16b121814ba53f4d8bdae7acf4 to your computer and use it in GitHub Desktop.

Select an option

Save gmillerd/af7e7f16b121814ba53f4d8bdae7acf4 to your computer and use it in GitHub Desktop.
dumpsqbt in perl
#!/usr/bin/perl
use strict;
use warnings;
use LWP::Simple;
use JSON;
use Data::Dumper;
my $QBT='https://hostname/api/v2/sync/maindata';
my $json=decode_json(get($QBT));
for my $id (keys %{$json->{'torrents'}}) {
my $torrent = $json->{'torrents'}->{$id};
print
# Dumper($torrent),
$torrent->{'name'}, "\n",
$torrent->{'infohash_v1'}, "\n",
$torrent->{'magnet_uri'} || '-', "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment