POL_Gamefront_Download

Informations

Créateur Messages
Xenos5

Information

Cet installateur a été accepté par l'équipe.

Informations

Plate-formes :
Téléchargements : 18485
Wine: System

Retours d'expérience

Description

Download a file from http://gamefront.com/
Parameters:
- 1: file ID
- 2: directory for temp files
- 3: result file name
- 4: download title

Code source

local ID="$1"
local TMP_DIR="$2"
local RESULT="$3"
local NAME="$4"
local URL1="http://gamefront.com/files/$ID"
local URL2="http://gamefront.com/files/service/thankyou?id=$ID"
local COOKIE="$TMP_DIR/cookie.txt"
POL_SetupWindow_wait "$(eval_gettext 'Contacting download server.')" "$TITLE"
$POL_WGET --cookies=on --keep-session-cookies --save-cookies="$COOKIE" -O /dev/null "$URL1"
local HTML_FILE="$TMP_DIR/url2.html"
$POL_WGET --referer="$URL1" --cookies=on --load-cookies="$COOKIE" --keep-session-cookies --save-cookies="$COOKIE" -O "$HTML_FILE" "$URL2"
GAMEFRONT_URL="$(grep 'click here' "$HTML_FILE" | grep -oE 'href="[^"]*"' | cut -d '"' -f2)"
POL_System_wget "$GAMEFRONT_URL" "$NAME" --referer="$URL2" --cookies=on --load-cookies="$COOKIE" --keep-session-cookies --save-cookies="$COOKIE" -O "$RESULT"

Contributions

Filters:

Contribuer
Membre Messages

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca-notice@playonlinux.com