Skip to main content

HomePage

HomePage is a trivial flask web app that pulls the audio track and from almost any internet video. It is intended to be deployed inside a private network for private use.

HomePage relies on trustworthy youtube_dl to download the videos, so quite a few sites are supported. Playlists are also supported.

HomePage

Prerequsites

  • python 3.6 or above with pip
  • Superuser access (for port 80)
  • pyenv and poetry (not required with PyPi)
  • Ubuntu, Debian, Mint or Arch.

Install

The basic installation is very simple.

$ python3 -m pip install --user homepage

# Normal desktop
$ homepage -i

# Server without x11
$ homepage -ic

If you are using Arch, please ensure you have an up-to-date version and package list

Then, you can deploy with:

$ homepage -dfp

Alternatively, if your system is running an older version of python or you wish to run this project inside a virtual environment, you can do that too.

First, go ahead and install pyenv. Then install poetry. Once you've installed those, we just to install a few more things.

$ git clone https://github.com/Sh3llcod3/HomePage.git
$ cd HomePage/
$ pyenv install 3.9.0
$ pyenv local 3.9.0
$ poetry poetry self update --preview
$ poetry update
$ poetry install # Add --no-dev if you don't want dev deps
$ poetry shell
$ homepage -ip
$ homepage -df

After installing pyenv, the lines you add to your ~/.bashrc/.bash_profile may need to be different, please see the FAQ.

Uninstall

If you installed using pip:

python3 -m pip uninstall -y homepage easyparse Flask youtube_dl gevent

and it will remove this completely from your system. You can vary this command based on what you want to keep.

Otherwise, if you've installed using poetry and assuming you're inside the current directory:

$ exit # Exit virtualenv or press Ctrl-d
$ poetry env remove 3.9
$ poetry cache clear --all pypi
$ cd .. && rm -rf HomePage/

Usage

Once deployed, if you're using this on the device which is hosting it, fire up your favourite web browser and head to http://localhost:5000/. If you're on another device, simply head to the IP address of the host node.

If you have Superuser access, use the -f switch. This will add an iptables rule forwarding port 80 to 5000.

Playlists are supported and all sites that will with ytdl will also work here.

Troubleshooting

I'm having problems with the env

You may have inserted the wrong lines in your ~/.bashrc or .bash_profile (if using arch). The initialization lines shown on the pyenv repo don't work well with poetry. Instead, add these lines to the end of the file and remove any previous lines you may have added before (taking care to ensure you don't remove anything else).

# Pyenv installation

if [[ -z "$VIRTUAL_ENV" ]]; then
    export PATH="$HOME/.pyenv/bin:$PATH"
    eval "$(pyenv init -)"
fi

Can I change the background?

To change the background, swap out homepage/static/bg.webp with any image you like, but keep the same name and use WEBP format.

Pyenv fails to install 3.9.0

You may have forgotten to install the crucial pyenv dependencies. Check here for their wiki page.

Then retry the pyenv installation.

Why does this exist?

I wanted a simple no-frills web-app to pull audio tracks on private network devices, without having access to a command line version of youtube_dl or resorting to using external sites or apps.

Why is it not working?

Your version of youtube_dl may be out of date. Having a version of youtube_dl that is even one version old can mean your tracks may fail to download. Fortunately, the repo is updated frequently and you can pull in the updates very easily.

If you're using it from PyPi, then:

$ python3 -m pip install --upgrade youtube_dl gevent Flask --user
$ youtube-dl --rm-cache-dir

If you're using it from Poetry, then go to your cloned repo and run:

$ poetry update
$ poetry shell

Does this scale to multiple users asynchronously?

No. It was never intended to scale in the first place. Neither is it secure in any way. Therefore, I should stress that you should NOT deploy this to anywhere except your RFC1918 private/internal network range with caution.

Does it have Windows support?

Yes. If you can get the latest executables for lame, atomicparsley, faac, ffmpeg and place them inside the project's directory, it should work.

To-do

  • Add auth
  • Replace xhr with websocket
  • Save user preferences using cookies
  • Display past tracks only for that user
  • Add management card
  • Make it work on windows and generate executables

Metadata

Release files for homepage 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for homepage 0.5.0
File Size Uploaded
homepage-0.5.0.tar.gz 281.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for homepage 0.5.0
File Interpreter ABI Platform
homepage-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 563.2 kB

Release files / homepage-0.5.0.tar.gz

Download URL homepage-0.5.0.tar.gz
Size 281.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ada30b4ad6228017eb8b21a917deadf98cc0ca40a4f8619aa0624bef8d8fc616
BLAKE2b-256 checksum
How to use checksums
9ed80788d1b8494d48d1ebe48bc2df8064a340ddc3bc159b9db7ff04c5c66214
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.0 Linux/5.4.0-54-generic

Release files / homepage-0.5.0-py3-none-any.whl

Download URL homepage-0.5.0-py3-none-any.whl
Size 281.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f03841c7a73cae320f76108387d442f1f9fdfeaad43ac4c646cb96df7c25fa43
BLAKE2b-256 checksum
How to use checksums
fd48e3de8a1b2b5283e5e241a607c0c8536fe2619e9e71403011ffc119c3afa7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.0 Linux/5.4.0-54-generic

Release history Release notifications | RSS feed

0.5.7

2 release files

0.5.5

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

This release

0.5.0 This release

2 release files

0.4.5

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.0

2 release files

0.2.9

2 release files

0.2.5

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page