Skip to content

Aimeast/HttpGetUrl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HttpGetUrl

Hget, short for HttpGetUrl, is a network download service that supports direct downloads via the HTTP/HTTPS protocols, analyse and download videos and playlists from Twitter (x.com) or YouTube.

Usage

Simply paste the resource URL and submit. The task will be automatically queued.

I. Installation on Ubuntu 24.04

Preparing the Environment

  1. Install dotnetcore

    apt-get update
    apt-get install -y aspnetcore-runtime-8.0
  2. Prepare folders Assuming the installation directory is /usr/local/hget, prepare the following folders:

    • /usr/local/hget/.hg : Stores hget configurations, Playwright.net browser configurations, and the yt-dlp executable file.

II. Compilation and Deployment

  1. Compile Publish this project with the target framework net8.0 and target runtime linux-x64.

  2. Upload binaries Upload all compiled binaries to the /usr/local/hget folder. Compress the .playwright directory (which contains numerous JS files) before uploading if necessary. Then grant execute permissions.

    cd /usr/local/hget/.playwright/node/linux-x64
    chmod +x node
  3. Configuration file Configure the production environment in appsettings.Production. This is an example, you need to modify parameters as your appropriate.

    {
      "https_port": 443,
      "Kestrel": {
        "Endpoints": {
          "Http": {
            "Url": "http://*:80"
          },
          "HttpsInlineCertFile": {
            "Url": "https://*:443",
            "Certificate": {
              "Path": "/path/to/.crt",
              "KeyPath": "/path/to/.key"
            }
          }
        }
      },
      "Hget": {
        "Proxy": "socks5://127.0.0.1:1081",
        "MaxConcurrentDownloads": 3
      }
    }
  4. Register service Copy hget.service from the code directory to /etc/systemd/system/, then run:

    systemctl enable hget

III. Installing Components

  1. PowerShell (for installing Playwright.net headless browser)

    apt-get update
    wget -q https://packages.microsoft.com/config/ubuntu/24.04/packages-microsoft-prod.deb
    dpkg -i packages-microsoft-prod.deb
    rm packages-microsoft-prod.deb
    apt-get update
    apt-get install -y powershell
    pwsh
  2. Playwright.net

    cd /usr/local/hget
    pwsh playwright.ps1 install
    pwsh playwright.ps1 install-deps
  3. yt-dlp

    cd /usr/local/hget/.hg
    wget -q https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp
    chmod +x yt-dlp
  4. ffmpeg

    apt-get install -y ffmpeg

IV. Testing

  1. Test run

    cd /usr/local/hget/
    dotnet HttpGetUrl.dll
  2. Update token Supports importing cookie.json files exported by the Firefox Cookie Manager plugin. Update cookies on the /tokens.htm page. Some resources require your login credentials to access them.

  3. Try download urls

    # Single file download
    https://github.com/FFmpeg/FFmpeg/archive/refs/heads/master.zip
    # Twitter video download
    https://x.com/elonmusk/status/1851515326581916096
    # YouTube video and playlist download
    https://youtube.com/shorts/FUoB6xVTdE8
    https://youtube.com/playlist?list=PLOGi5-fAu8bGbCMgtuuNf8t-kV28ZhnGa

V. Start service

  1. Everything is ready
    systemctl start hget

License

This project is licensed under the MIT License.

About

A web download service for video resources

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published