Created
July 29, 2023 14:29
-
-
Save gmillerd/af7e7f16b121814ba53f4d8bdae7acf4 to your computer and use it in GitHub Desktop.
dumpsqbt in perl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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}; | |
| # 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