Skip to main content

Converts text and youtube .csv files into FreeTube playlists

Project description

PyPIPyPI - Downloads

Freetube-import

Creates FreeTube .db playlist files from a list of youtube video urls separated by a newline (.txt) or from .csv files exported from 'Google takeout'.

Run the scrip with a path to a valid .txt file of youtube urls, or youtube's .csv playlist file. Then import the resulting .db file into FreeTube.

Install via pip:

  pip install freetube-import

https://pypi.org/project/freetube-import/

Basic usage:

  freetube-import <file>... <file2> <file3>

Help message:

  usage: freetube_import.py [-h] [-a] [-b] [-e] [-s] [filepath ...]

  Import youtube playlists

  positional arguments:
    filepath              path to a valid .txt or .csv playlist file or files

  optional arguments:
     -h, --help        show this help message and exit
     -a, --list-all    Takes all .txt and csv files as input from the current working directory.
     -e, --log-errors  Also lists the videos that failed the metadata fetch
     -s, --stdin       Takes stdin as input and outputs dirextly to stdout
     -n, --name NAME   sets a name for playlist, otherwise uses input filename
     -d, --debug       Debug mode with more info

While buggy and experimental stdin mode can used in scripts and automation. Not for average users.

   cat test.txt | freetube-import -s > std_test.db

It might be usefull to set a name that shows up in FreeTube. Otherwise in stdin mode a placeholder name is generated.

   cat test.txt | freetube-import -s -n playlist-name > std_test.db

pro tip: Try appending the ouput to FreeTube's own playlist.db file. So playlists get automatically added. (at your own risk, backup your files beforehand, close freetube to avoid file corruption)

  cat test.txt | freetube-import -s -n playlist-name >> your/path/FreeTube/playlists.db

Works without YouTube api through a custom version of YouTube-search library. Also works atleast on piped links, probably also on lists of Invidious links and other links that follow the standard youtube url format. VPN/proxy isn't strictly nessesary by my experience. I have run 1,5k videos videos through this in one sitting and gotten no ip blocks.

Dependencies

   pip install requests

https://pypi.org/project/requests/

  pip install tqdm

https://pypi.org/project/tqdm/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

freetube_import-0.38.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

freetube_import-0.38.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file freetube_import-0.38.0.tar.gz.

File metadata

  • Download URL: freetube_import-0.38.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for freetube_import-0.38.0.tar.gz
Algorithm Hash digest
SHA256 4388211f3ecaa9fc0ac20bbf2d4e7bd558a1414319e541acd9f067a150a4a6f1
MD5 970a3507b70d817943c38f2e97026e52
BLAKE2b-256 caa15adf2188160081ad791e76899af128c4d40415ab218e493e9e5c2f1215ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for freetube_import-0.38.0.tar.gz:

Publisher: python-publish.yml on NoSpiner/Freetube-import

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file freetube_import-0.38.0-py3-none-any.whl.

File metadata

File hashes

Hashes for freetube_import-0.38.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67a5af628fc2eb27cd362111782429b47069422af529ab01427a4c952b6d2c76
MD5 4d5070a6b32e9ef97a70ea4e1fdeea01
BLAKE2b-256 f1678e6d28c1684d711bddd83a572b394efe736ac9ffa9761c4cb4465b6d2f63

See more details on using hashes here.

Provenance

The following attestation bundles were made for freetube_import-0.38.0-py3-none-any.whl:

Publisher: python-publish.yml on NoSpiner/Freetube-import

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page