Skip to content

p2p links

Chemi edited this page Jun 19, 2018 · 3 revisions

Adding p2p links

With cron or menu->scrappweb can download new torrent files or add to app with cmd, but commands are launched with apache user and its better way to add to text file and app monitor that folder/txtfile (echo "%MAGNET%" >> '/downloads/myfiletomonitormagnets.txt'). With menu->webspider can extract valid links (amule, magnet, torrent or direct download) and send to external app for download. Can be configure deep for exclude external links or max links to check.

Torrents

  • Config PPATH_WEBSCRAP_DOWNLOAD folder where download all torrents files, can be monitored by torrent app to get changes
  • Config PPATH_WEBSCRAP_TORRENT_CMD command with %FILE% to add to your app
    • Example: transmissioncli "%FILE%"

Magnets

  • Config PPATH_WEBSCRAP_MAGNETS_CMD command with %MAGNET% to add to your app
    • Example: transmissioncli "%MAGNET%"

Elinks

  • Config PPATH_WEBSCRAP_EMULE_CMD command with %MAGNET% to add to your app
    • Example: ed2k "%ELINK%"

Example script to monitor ed2k and magnets text files

#!/bin/bash

AMULEFILE='/downloads/amule.txt'
MAGNETFILE='/downloads/magnets.txt'

while true; do
        date
        if [ -f "$AMULEFILE" ]; then 
                echo "Checking File $AMULEFILE";
                while read -r line
                do
                    name="$line"
                    echo "ed2k: $name"
                    ed2k "$line"
                done < "$AMULEFILE"
                truncate -s 0 "$AMULEFILE"
        fi
        if [ -f "$MAGNETFILE" ]; then
                echo "Checking File $MAGNETFILE";
                while read -r line
                do
                    name="$line"
                    echo "Magnet: $name"
                    transmission-remote "http://127.0.0.1:PORT/transmission" -a "$line"
                done < "$MAGNETFILE"
                truncate -s 0 "$MAGNETFILE"
        fi
        #wait 5 mins
        sleep 300
done

JDownloader

  • Configured in config::PPATH_WEBSCRAP_JDOWNLOADER_FOLDER
  • Create for each download url a file.crawljob that can be imported by JDownloader
  • JDownloader can be configure to watch that folder and autoimport crawljob files (import, add to downloads and start download config needed)

Plowshare

  • direct download by config::PPATH_WEBSCRAP_PLOWSHARE_CMD
  • plowshare can use external captcha resolver like cmd example provided (9kw)

Youtube

  • example provided searching on duckduckgo and downloading with youtube-dl