Skip to main content

HomePage

HomePage is a trivial flask web app that allows downloading the audio track from almost any internet video. It is intended to be deployed inside a private network for personal use, so that hosts within the network can access and download the tracks they want.

HomePage is very basic, but it has a Material Design front-end which is simple and easy to use. HomePage uses youtube_dl to download the videos, so quite a few sites are supported.

HomePage

Setup & Prerequsites

  • The apt package manager
  • python3.6 or above
  • The pip module for the above python version
  • sudo access if you wish to use port 80
  • A Debian based distro. (tested on: Ubuntu 18.04 LTS)
  • pyenv installed (optional)
  • poetry installed (optional)

The basic installation is very simple.

$ python3 -m pip install homepage
$ homepage -ip

Then, you can deploy with:

$ homepage -df

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. In fact, this is the recommended method of installing this project.

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.7.3
$ pyenv local 3.7.3
$ poetry self:update --preview || poetry self update --preview
$ poetry update
$ poetry install
$ poetry shell
$ homepage -ip
$ homepage -df

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

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://0.0.0.0:5000/. If you're on another device, simply head to the IP address that it prints out when you run it.

If you have sudo access, please use the -f switch. If you don't, other hosts can still use this, but they will need to explicitly specify the port, e.g. http://192.168.0.10:5000.

From there, you just need to select your options and paste in a link to the video or playlist that you want to download the tracks from. Obviously, you can download from YouTube, but thanks to the power of the youtube_dl library, many other sites will also work, e.g. Vimeo, or Reddit. You can find the full list here.

FAQ & Troubleshooting

I'm having trouble with the env

You may have inserted the wrong lines in your ~/.bashrc. 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?

You absolutely can. To change the background, change out homepage/static/Background.jpg with any image you like, but it has to be called Background.jpg and in the JPEG format. I will make this process easier in the future.

Pyenv fails to install 3.7.3

You may have forgotten to install some crucial pyenv dependencies from apt. Go ahead and install the packages below. If you're using other package managers, HomePage won't work, but here is their wiki page.

$ sudo apt update
$ sudo apt-get install -y --no-install-recommends make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev

Why does HomePage exist?

That is a really good question. I wanted a simple web app where I could download music from various videos on any device, without having access to a command line version of youtube_dl or resorting to using shady sites and apps.

The code is bad at best, but it is functional and you have the freedom of choice. Whether you want to use it or not is up to you, but I assumed that people prefer convenience, so I should probably upload this where more people may be able to take advantage of this.

Does HomePage scale?

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 private/internal network.

Why does it take a long time?

Time is of the essence. I understand that if a specific computational task does not complete as quickly as someone anticipates, it can leave the user feeling disappointed.

However, the length of time it takes for a specific video to be downloaded heavily depends on several factors, such as the length, quantity and chosen quality of the download. On top of this, you have to consider that for each video you download, youtube_dl has to first download the video, then it has to be encoded in your preferred format using ffmpeg. That can take a while, especially on older systems.

I am always looking to optimise this so it downloads and converts the videos faster, but if you have any tips, please create an issue and I'll check it out as soon as possible.

To-do

  • Add an authentication page.
  • Make site restore state after a download.
  • Save user preferences using cookies.
  • Display past tracks only for that host.
  • Add a separate page for management.

Metadata

Release files for homepage 0.2.5

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.2.5
File Size Uploaded
homepage-0.2.5.tar.gz 431.5 kB Details

Built distribution (wheel)

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

Total release size: 864.5 kB

Release files / homepage-0.2.5.tar.gz

Download URL homepage-0.2.5.tar.gz
Size 431.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8da887efbad6d6610c2ce718968ee8b6700c0bab0227fd97a2108856fb32a416
BLAKE2b-256 checksum
How to use checksums
f8901d927628611244ed21fb7fd93e033a1dfb5db28b18349a5d7177003410d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

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

Download URL homepage-0.2.5-py3-none-any.whl
Size 433.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
db9b61aef60d0b4658b5599bac9427bb6376c0549a8a8a825c51113e15a6999d
BLAKE2b-256 checksum
How to use checksums
916679d0e124595e7287ef293dee221c90ad6924da09793cf7977e174a18ee2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

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

0.5.0

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

This release

0.2.5 This release

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