A library of functions that can be used to manage the download of claims from the LBRY network.

Overview

lbrytools

A library of functions that can be used to manage the download of claims from the LBRY network. It includes methods to download claims by URI (canonical url), claim ID, or from specific channels.

It also includes methods to clean up older files and free space, so the functions are suitable for use in a headless computer that will download files, and seed them to the network with little user intervention.

This libary is released as free software under the MIT license.

Motivation

The LBRY Desktop application provides basic functionality to manage downloaded claims. Real control of the system is achieved with the lbrynet headless client, also called the lbry-sdk.

This library provides convenience functions that wrap around lbrynet in order to search, download, and delete many claims easier.

This library is inspired by tuxfoo's lbry-seedit script, which provides basic functions, and a configuration file to download and seed claims. Initially tuxfoo's code was extended slightly but eventually an entire library was written from scratch to provide more functionality.

Installation

You must have the LBRY Desktop application or the lbrynet client. Get them from lbry.com/get.

You must have Python installed. Most Linux distributions come with Python ready to use; for Windows you may need to get the official package, or a full featured distribution such as Anaconda.

Copy the internal lbrytools directory, and place it inside a site-packages directory that is searched by Python. This can be in the user's home directory,

/home/user/.local/lib/python3.8/site-packages/lbrytools

or in a system-wide directory:

/usr/local/lib/python3.8/dist-packages/lbrytools
/usr/lib/python3/dist-packages/lbrytools

You can also modify the PYTHONPATH environmental variable to include the parent directory where lbrytools is located:

PYTHONPATH=/opt/git/lbrytools:$PYTHONPATH

This library was developed and tested with Python 3.8 but it may also work with earlier versions with small changes. It uses standard modules such as importlib, os, random, requests, sys, and time.

Usage

Make sure the lbrynet daemon is running either by launching the full LBRY Desktop application, or by starting the console lbrynet program.

lbrynet start

Then open a Python console, import the module, and use its methods.

import lbrytools as lbryt

lbryt.download_single(...)
lbryt.ch_download_latest(...)
lbryt.ch_download_latest_multi(...)
lbryt.redownload_latest(...)
lbryt.download_claims(...)
lbryt.print_summary()
lbryt.print_channels()
lbryt.delete_single(...)
lbryt.ch_cleanup(...)
lbryt.ch_cleanup_multi(...)
lbryt.remove_claims(...)
lbryt.measure_usage(...)
lbryt.cleanup_space(...)
lbryt.remove_media()
lbryt.count_blobs(...)
lbryt.count_blobs_all(...)
lbryt.analyze_blobs(...)
lbryt.download_missing_blobs(...)
lbryt.analyze_channel(...)
lbryt.print_channel_analysis(...)
lbryt.blobs_move(...)
lbryt.blobs_move_all(...)
lbryt.claims_bids(...)
lbryt.channel_subs(...)
lbryt.list_accounts(...)
lbryt.list_playlists(...)
lbryt.list_supports(...)
lbryt.print_blobs_ratio(...)
lbryt.create_support(...)
lbryt.abandon_support(...)
lbryt.target_support(...)

Read the lbrytools.md file for a short explanation on the most useful functions in the library.

Zeedit script

This script uses the lbrytools methods to achieve the same objective as tuxfoo's original lbry-seedit. It downloads content from various channels, and then seeds the blobs to the network. This script should be run periodically to constantly download new content, and remove the older files if they take too much space. See zeedit.py.

If lbrytools is correctly installed in the Python path, the script can be executed directly, or through the Python interpreter.

python zeedit.py [config.py]

A configuration file should be passed as the first argument.

python zeedit.py funny_config.py
python zeedit.py tech_channels_config.py
python zeedit.py cooking_conf.py

The configuration file specifies the channels to download content from, the download directory, the limit in gigabytes before cleanup of older files is started, and whether to write a summary of all downloaded claims. Modify the zeedit_config_example.py to your liking, and read the comments in it to understand what each variable does. Only the channels variable is mandatory, all others have a default value if they are missing in the configuration file.

If no argument is given, or if the provided configuration file does not exist, it will default to loading a configuration under the name zeedit_config.py; if this is not available, it will simply exit.

To keep everything contained, the lbrytools package can be placed in the same directory as zeedit.py and zeedit_config.py.

zeedit/
      zeedit.py
      zeedit_config.py
      lbrytools/
               __init___.py
               blobs.py
               ...

Development

Ideally, this collection of tools can be merged into the official LBRY sources so that everybody has access to them. Where possible, the tools should also be available from a graphical interface such as the LBRY Desktop application.

If you wish to support this work you can send a donation:

LBC: bY38MHNfE59ncq3Ch3zLW5g41ckGoHMzDq
XMR: 8565RALsab2cWsSyLg4v1dbLkd3quc7sciqFJ2mpfip6PeVyBt4ZUbZesAAVpKG1M31Qi5k9mpDSGSDpb3fK5hKYSUs8Zff
Exfiltrate files using the HTTP protocol version ("HTTP/1.0" is a 0 and "HTTP/1.1" is a 1)

http-protocol-exfil Use the HTTP protocol version to send a file bit by bit ("HTTP/1.0" is a 0 and "HTTP/1.1" is a 1). It uses GET requests so the Blu

Ricardo Ruiz 23 Apr 30, 2022
This Tool can help enginners and biggener in network, the tool help you to find of any ip with subnet mask that can calucate them and show you ( Availble IP's , Subnet Mask, Network-ID, Broadcast-ID )

This Tool can help enginners and biggener in network, the tool help you to find of any ip with subnet mask that can calucate them and show you ( Availble IP's , Subnet Mask, Network-ID, Broadcast-ID

12 Dec 13, 2022
Multi-vendor library to simplify CLI connections to network devices

Netmiko Multi-vendor library to simplify CLI connections to network devices Why Netmiko? Network automation to screen-scraping devices is primarily co

Kirk Byers 3k Jan 01, 2023
Network Dynaimcs Simulation

A Final Year Project in CUHK, Autumn 2021 Network Dynaimcs Simulation Files param.h edit all the variables & settings here simulate.c the main program

Likchun 0 Mar 28, 2022
DNS monitoring system built with Python.

DNS monitoring system built with Python.

Andressa Cabistani 7 Sep 28, 2021
sshuttle: where transparent proxy meets VPN meets ssh

Transparent proxy server that works as a poor man's VPN. Forwards over ssh. Doesn't require admin. Works with Linux and MacOS. Supports DNS tunneling.

9.4k Jan 09, 2023
Tool written on Python that locate all up host on your subnet

HOSTSCAN Easy to use command line network host scanner. From noob to noobs. Dependencies Nmap 7.92 or superior Python 3.9 or superior All requirements

NexCreep 4 Feb 27, 2022
ProtOSINT is a Python script that helps you investigate Protonmail accounts and ProtonVPN IP addresses

ProtOSINT ProtOSINT is a Python script that helps you investigate ProtonMail accounts and ProtonVPN IP addresses. Description This tool can help you i

pixelbubble 249 Dec 23, 2022
GitHub action for sspanel automatically checks in to get free traffic quota

SSPanel_Checkin This is a dish chicken script for automatic check-in of sspanel for GitHub action, It is only applicable when there is no verification

FeedCatWithFish 7 Apr 28, 2022
Remote vanilla PDB (over TCP sockets) done right: no extras, proper handling around connection failures and CI.

Overview docs tests package Remote vanilla PDB (over TCP sockets) done right: no extras, proper handling around connection failures and CI. Based on p

Ionel Cristian Mărieș 227 Dec 27, 2022
A Python server and client app that tracks player session times and server status

MC Outpost A Python server and client application that tracks player session times and server status About MC Outpost provides a session graph and ser

Grant Scrits 0 Jul 23, 2021
Keep your application settings in sync (OS X/Linux)

Mackup Keep your application settings in sync. Table of content Quickstart Usage What does it do Bullsh*t, what does it really do to my files Supporte

Laurent Raufaste 12.8k Jan 08, 2023
A simple python application for generating a WiFi QR code for ease of connection

A simple python application for generating a WiFi QR code Initialize the class by providing QR code values WiFi_QR_Code(self, error_correction: int =

Ivan 2 Aug 01, 2022
Build custom OSINT tools and APIs (Ping, Traceroute, Scans, Archives, DNS, Scrape, Whois, Metadata & built-in database for more info) with this python package

Build custom OSINT tools and APIs with this python package - It includes different OSINT modules (Ping, Traceroute, Scans, Archives, DNS, Scrape, Whoi

QeeqBox 52 Jan 06, 2023
wireguard-config-benchmark is a python script that benchmarks the download speeds for the connections defined in one or more wireguard config files

wireguard-config-benchmark is a python script that benchmarks the download speeds for the connections defined in one or more wireguard config files. If multiple configs are benchmarked it will output

Sal 12 May 07, 2022
Py script to aid in setting up the boot chime in OpenCore.

BootChime Py script to aid in setting up the boot chime in OpenCore. It does so by helping you locate your IOHDACodecDevices, IOHDACodecAddress values

CorpNewt 7 Sep 19, 2022
This tool extracts Credit card numbers, NTLM(DCE-RPC, HTTP, SQL, LDAP, etc), Kerberos (AS-REQ Pre-Auth etype 23), HTTP Basic, SNMP, POP, SMTP, FTP, IMAP, etc from a pcap file or from a live interface.

This tool extracts Credit card numbers, NTLM(DCE-RPC, HTTP, SQL, LDAP, etc), Kerberos (AS-REQ Pre-Auth etype 23), HTTP Basic, SNMP, POP, SMTP, FTP, IMAP, etc from a pcap file or from a live interface

1.6k Jan 01, 2023
Securely and anonymously share files, host websites, and chat with friends using the Tor network

OnionShare OnionShare is an open source tool that lets you securely and anonymously share files, host websites, and chat with friends using the Tor ne

OnionShare 5.4k Jan 01, 2023
An API for controlling Wi-Fi connections on Balena devices.

Description An API for controlling Wi-Fi connections on Balena devices. It does not contain an interface, instead it provides API endpoints to send re

8 Dec 25, 2022
A non-custodial oracle and escrow system for the lightning network. Make LN contracts more expressive.

Hodl contracts A non-custodial oracle and escrow system for the lightning network. Make LN contracts more expressive. If you fire it up, be aware: (1)

31 Nov 30, 2022