Du bist nicht angemeldet.
Ganz frisch:
Datei "/lib/hoster/onefichier_com.sh":
#!/bin/ash
# Copyright (c) 2014 genuK/genuk@gmx.net
# Fritzload hosterplugin for http://onefichier.(com\|net\|org\|fr\)
DEBUG_GET=1
onefichier_com_onlineStatus() {
local param=$1 url fid
# Try to get a "strict" url
fid=$(echo $param |\
sed -n 's|.*://\(www.\)\?\([a-zA-Z0-9]*\).1fichier.\(com\|net\|org\|fr\).*|\2|p') \
&& url="http://$fid.1fichier.com"
print "=== File id is: $fid ==="
print "=== File url is: $url ==="
local checklink="https://www.1fichier.com/check_links.pl"
local checkdata="links[]=$url"
GET "$checklink" $f "--data $checkdata" "GET-CHECKURL"
if grep -q -i "NOT FOUND\|BAD LINK" $f; then
errmsg "=== Link: $param nicht gefunden. Link ungueltig ==="; return 1
else
echo "$f"
fi
}
onefichier_com() {
local link filename filesize data download_link
local f=$tmp/response.htm c=$tmp/dl.cookie.txt
local language="lg=en"
# check online availability
if ! f="$(onefichier_com_onlineStatus "$param")"; then
errmsg "URL-Adresse: Offline ($param)"
return 1
fi
IFS=';' read link filename filesize <$f
print "=== Extracted link is: $link ==="
print "=== Extracted filename is: $filename ==="
print "=== Extracted filesize is: $filesize ==="
while [ $try -lt $retries ]; do
try=$(($try+1))
# get the url from downloadlist and load the answer in $f
GET "$param" $f "--cookie $c --cookie $language --cookie-jar $c" "GET1"
# check http status code
if [ "$H_CODE" = 404 ] && grep -qiE "<h3>File Not found</h3>" $f ;then
errmsg "SERVER-FEHLER: Link nicht gefunden!; HTTP-Statuscode: $H_CODE"
errmsg "Link Adresse falsch?"
return 1
elif grep -qiE "color:red\">Warning.*you must wait between each downloads" $f; then
print "=== Download limit erreicht. Versuche reconnect. ==="
{ needReconnect; continue; }
elif grep -qiE "color:red\">Warning.*you can download only one file at a time" $f; then
errmsgWait 0 10 "Ein anderer Download laeuft noch."
continue
fi
# get filename if not already done
if [ -z "$filename" ]; then
errmsg "Der filename konnte nicht gefunden werden, eine 2. Methode wird versucht..."
filename="$(grep 'Filename :' $f | sed -e 's/.*<td>\(.*[^<\/]\)<\/td>.*/\1/')"
elif [ -z "$filename" ]; then
# write the log if "$filename" not found
errmsg "FAILED: Could not resolve filename"
return 1
fi
print "=== Extracted filename is: $filename ==="
# get filesize if not already done
if [ -z "$filesize" ]; then
errmsg "filesize konnte nicht gefunden werden, eine 2. Methode wird versucht..."
filesize="$(grep 'Size :' $f | sed -e 's/^.*<td>\(\([0-9]*\.[0-9]*\) [K\|M\|G][B\|b]\)<\/td>.*$/\1/')"
fi
print "=== Extracted filesize is: $filesize ==="
# extract the form action
form_action="$(<$f parse_form_action)"
if [ -z "$form_action" ]; then
# write the log if "$form_action" not found
errmsg "FAILED: Could not resolve form_action URL"
return 1
fi
print "=== Extracted form_action is: $form_action ==="
data="id=Download"
GETN "$form_action" $f "--referer $param --cookie-jar $c --data $data" "GET2"
download_link=$H_LOCATION
if [ -z "$download_link" ]; then
errmsgWait 0 10 "File link is alive but not currently available, try later."
continue
fi
print "=== Extracted download_link is: $download_link ==="
notalreadyLoaded "$targetdir/$filename" || return
if download "$download_link" "$filename" "-b $c -c $c"; then
succes=1
break
fi
done
}
Weil die Links in der Form http://[a-zA-Z0-9].1fichier.(com|net|org|fr) sind, noch eine kleine Änderung in /lib/download.sh.
In der Funktion getmodulename()
die Zeile
local modulename=$(echo $hosterdomain | tr '\-.' '_')
mit
local onefichier="$(echo $hosterdomain | grep "1fichier\.")"
if [ ! -z "$onefichier" ]; then
local modulename="onefichier_com"
else
local modulename=$(echo $hosterdomain | tr '\-.' '_')
fi
ersetzen.
Grüße
Der Beitrag wurde geändert von genuk (am 02. May. 2014 um 12:29 Uhr)
Abwesend
Habe ich eingecheckt.
Abwesend