發新話題
打印

Freegrab上傳下載shareme v2空間腳本教學(會用的直接看轉貼內容跟後續即可)(7/3更新)

本主題由 kevin 於 2008-4-18 10:10 PM 設置高亮

Freegrab上傳下載shareme v2空間腳本教學(會用的直接看轉貼內容跟後續即可)(7/3更新)



如果是申請免費會員的話,建議用FGB開一線下載就好, 謝謝合作!!
shareme V2有公告說免費會員只能下載一個檔案...如果您不希望那天被shareme發現再改版的話就遵守規定對大家比較好


所以因為v2版的一些限制
要使用FGB下載就請自行申請一個個人專用的Shareme空間帳號
不提供直接可用的純腳本下載
也請不要使用公用帳號之類的來編輯

Shareme註冊頁面
引用:
freegrab腳本編輯軟體 Madedit(繁體中文-綠色軟體)
官網:
http://madedit.sourceforge.net

官網下載點:
http://sourceforge.net/project/showfiles.php?group_id=123568

如果不知道要下載哪一個就下我傳的載點吧...
只是目前出到v0.2.8不過因為個人不是很喜歡那一版的圖示 所以是傳v0.2.7的
http://cn.ziddu.com/traditional/ ... ZbKWlJqiZ6uflJs%3D5
下面是轉貼的腳本編輯的內容
如果看不懂的話 最下面有比較清楚的圖解和說明
引用:
------------------------------------------------------------------------------
轉貼內容
轉自無限論壇
原出處:http://pro.tw.fdzone.org/viewthr ... p;extra=&page=1
可轉証明

------------------------------------------------------------------------------
我所使用的 shareme.lua
如何使用這個腳本,您有兩個方法

1. 在以下欄位填上相對應的資料
DownUserMail = "        "   下載用的帳號
DownPassWord = "        "       密碼
DownUserID   = "        "       流水號(可不填)
  UpUserMail = "        "   上傳用的帳號
  UpPassWord = "        "       密碼
  UpUserID   = "        "       流水號(可不填)

2.自己打帳號密碼 (檔案清單內 右鍵->屬性->進階->)
Username(帳號)    =   電子郵件形式的帳號
Password(密碼)    =   密碼-流水號 (請不要省 減號)    ex:   password-I0123456

以上流水號都可以省略,除非(簡言之:這是帳號切換開關 有寫才會切換帳號)
1.您要傳檔案到指定帳戶的時候才要寫上(多帳號時)
2.您的上下傳帳號分開的(上傳用 32GB 下載用2GB)

如何找流水號:
請打開瀏覽器,登入shareme網站中的檔案管理,隨意上傳一個檔案後複製其連結,可能如下
http://www.shareme.tw/file/Downl ... 32f37352e7061727430
其中 I04567XX 即為您的流水號

為什麼又取消編碼腳本:
因為我沒弄懂 函數之間的相容關係(新舊版本之間函數有些微不同)
AddFormFile( "file", false) 這是新版才能用的.....  
現在弄懂了,當然就能用回我習慣公開的開放腳本

使用上注意的地方:
如果您上傳的檔案太小可能會導致網頁瞬間完檔而抓不到檔名,進而無法取得連結(舊版才會)

舊版本(1.2.3.4以上1.2.3.4.4以下版本)
複製內容到剪貼板
代碼:
--[[
freegrab.MODULE["shareme.tw"]        =        {        name="shareme", cat="webhost",
                                                home="http://www.shareme.tw",        charset="UTF-8",
                                                fnformat="$url.$ext"}
]]
MODULE_NAME = "shareme"
MODULE_VERSION = "0.0.4"
MODULE_REQUIRE_VERSION = "1.2.3.4"
MODULE_AUTHOR = ""
MODULE_LAST_UPDATE = "2008/07/03"
MODULE_DESCR = [[  ]]

DownUserMail = "        @seed.net.tw"
DownPassWord = "        "
DownUserID   = "        "
  UpUserMail = "        @seed.net.tw"
  UpPassWord = "        "
  UpUserID   = "        "

-------------------------------------------------------------------------
--local func
-------------------------------------------------------------------------
local function printnow()
        if not Compile("(.*)") then return false end
        local _,ttt = What()
        UpdateLog(ttt)
        return true
end

local function GetLoginInfo()
        local UserMail = GetUsername()
        local PassWord = GetPassword():match("(.+)%-")
        local UserID   = GetPassword():match("%-(.+)")
        return UserMail, PassWord, UserID
end

local function LoginShareMe(username, password, userid)  -- Shield of Login
        if not GetHtml("http://www.shareme.tw/file/FileManager.do") then return false end
        if not Compile('"(I[^:]+):-du-') then return false end
        local _,webuserid1 = What()
        if webuserid1 then
                if not userid then UpdateLog( "沒有提供使用者流水號,故不檢查帳號正確性" ) return true end
                if userid:len() == 0 then UpdateLog( "沒有提供使用者流水號,故不檢查帳號正確性" ) return true end
                if webuserid1 == userid then return true end
                if not GetHtml("http://www.shareme.tw/member/Logout.do") then return false end
        end
        AddFormField("account", username)
        AddFormField("password", password)
        AddFormField("rememberInfo", "on")
        if not PostForm("http://www.shareme.tw/member/Login.do") then return false end
        if not GetHtml("http://www.shareme.tw/file/FileManager.do") then return false end
        if not Compile('"(I[^:]+):-du-') then return false end
        local _,webuserid2 = What()
        if webuserid2 then
                if not userid then UpdateLog( "沒有使用者提供流水號,故不檢查帳號正確性" ) return true end
                if userid:len() == 0 then UpdateLog( "沒有提供使用者流水號,故不檢查帳號正確性" ) return true end
                if webuserid2 ~= userid then UpdateLog( "提供的使用者流水號不正確" ) return false end
                return true
        else
                UpdateLog( "登入用的使用者帳號、密碼、流水號不正確" )
                UpdateLog( "帳號欄位:fdzone@shareme.seed.net.tw    (只是舉例不是真的能用)" )
                UpdateLog( "密碼欄位:pwfdzone-I0123456    (是下載者的使用者流水號)" )
                return false
        end
end

local function DownFile()
        local baseurl = GetUrl()
        if not GetUsername() or not GetPassword() then else
                DownUserMail, DownPassWord, DownUserID = GetLoginInfo()
        end
        if not LoginShareMe(DownUserMail, DownPassWord, DownUserID) then return false end
        if not GetHtml(baseurl) then return false end
        if not Compile('location="([^"]+Download[^"]+)".*?fileInfoName">([^<]+)<') then return false end
        local _, dl, fn = What()
        if not fn then UpdateLog( "找不到檔名" ) return false end
        if not dl then UpdateLog( "找不到連結" ) return false end
        SetFilename(fn)
        return GetFile("http://www.shareme.tw"..dl)
end

-------------------------------------------------------------------------
--main
-------------------------------------------------------------------------
function Download()
        local url = GetUrl()
        --http://shareme.seed.net.tw/UserFile.do?fileid=
        --http://shareme.seed.net.tw/file/DownloadRequest.do?fid=
        --http://www.shareme.tw/UserFile.do?fileid=
        --http://www.shareme.tw/file/DownloadRequest.do?fid=
        if url:find( "UserFile.do" ) or url:find( "DownloadRequest.do" ) then
                url = url:replace("UserFile.do?fileid", "file/DownloadRequest.do?fid")
                url = url:replace("shareme.seed.net.tw", "www.shareme.tw")
                SetUrl(url)
                return DownFile()
        else
                UpdateLog( "網址有誤" )
                return false
        end
end

function Upload()
        if not GetUsername() or not GetPassword() then else
                UpUserMail, UpPassWord, UpUserID = GetLoginInfo()
        end
        if not LoginShareMe(UpUserMail, UpPassWord, UpUserID) then return false end

        if not Compile('"/nhdfiles/public", "([^"]+)"') then return false end
        local _,public_folder = What()
        if not public_folder then        UpdateLog( "找不到公開資料夾" )        return false        end
        SetReferer("http://www.shareme.tw/file/FileManager.do")
        if not PostForm("http://www.shareme.tw/file/UploadFilesForm.do?ot=j&fid="..public_folder:replace(":", "%3A")) then return false end

        if not Compile('id_prefix = "([^"]+)".*?id_index = ([^;]+);') then return false end
        local _,id_prefix,id_index = What()
        if not id_prefix or not id_index then        UpdateLog( "找不到id_prefix,id_index" )        return false        end
        local uploadUUID = id_prefix.."_"..id_index
        AddFormField( "uploadid", "", false)
        AddFormFile( "file")
        --AddFormFile( "file", false)
        --AddFormFile( "file", false)
        SetReferer("http://www.shareme.tw/file/UploadFilesForm.do?ot=j&fid="..public_folder:replace(":", "%3A"))
        if not UploadFile("http://www.shareme.tw/file/UploadFiles.do?folderid="..public_folder.."&uploadUUID="..uploadUUID) then return false end

        if not GetHtml("http://www.shareme.tw/file/view/uploadStatusReport.jsp?uploadUUID="..uploadUUID) then return false end
        if not Compile('fileName>([^<]+)</fileName') then return false end
        local _, fileName = What()
        if not fileName then        UpdateLog( "找不到fileName" )        return false        end
        if not GetHtml("http://www.shareme.tw/file/GetFiles.do?fid="..public_folder) then return false end
        if not Compile('<id>([^<]+)</id><name>'..fileName..'</name>') then return false end
        local _,fid = What()
        if not fid then        UpdateLog( "找不到fid" )        return false        end
        SetUrl("http://www.shareme.tw/file/DownloadRequest.do?fid="..fid)

        --if not GetHtml("http://www.shareme.tw/file/GetFiles.do?fid="..public_folder) then return false end
        --if not Compile('<id>([^<]+)</id><name>'..GetFilename()..'</name>') then return false end
        --local _,fid = What()
        --if not fid then        UpdateLog( "找不到fid" )        return false        end
        --SetUrl("http://www.shareme.tw/file/DownloadRequest.do?fid="..fid)

        UpdateLog("上傳成功")
        return true
end

-------------------------------------------------------------------------
--end of file
-------------------------------------------------------------------------
新版本(1.2.3.4.4以上版本)
複製內容到剪貼板
代碼:
MODULE_NAME = "shareme"
MODULE_VERSION = "0.0.4"
MODULE_REQUIRE_VERSION = "1.2.3.4.4"
MODULE_AUTHOR = ""
MODULE_LAST_UPDATE = "2008/07/03"
MODULE_DESCR = [[  ]]

DownUserMail = "        @seed.net.tw"
DownPassWord = "        "
DownUserID   = "        "
  UpUserMail = "        @seed.net.tw"
  UpPassWord = "        "
  UpUserID   = "        "

-------------------------------------------------------------------------
--local func
-------------------------------------------------------------------------
local function printnow()
        if not Compile("(.*)") then return false end
        local _,ttt = What()
        UpdateLog(ttt)
        return true
end

local function GetLoginInfo()
        local UserMail = GetUsername()
        local PassWord = GetPassword():match("(.+)%-")
        local UserID   = GetPassword():match("%-(.+)")
        return UserMail, PassWord, UserID
end

local function LoginShareMe(username, password, userid)  -- Shield of Login
        if not GetHtml("http://www.shareme.tw/file/FileManager.do") then return false end
        if not Compile('"(I[^:]+):-du-') then return false end
        local _,webuserid1 = What()
        if webuserid1 then
                if not userid then UpdateLog( "沒有提供使用者流水號,故不檢查帳號正確性" ) return true end
                if userid:len() == 0 then UpdateLog( "沒有提供使用者流水號,故不檢查帳號正確性" ) return true end
                if webuserid1 == userid then return true end
                if not GetHtml("http://www.shareme.tw/member/Logout.do") then return false end
        end
        AddFormField("account", username)
        AddFormField("password", password)
        AddFormField("rememberInfo", "on")
        if not PostForm("http://www.shareme.tw/member/Login.do") then return false end
        if not GetHtml("http://www.shareme.tw/file/FileManager.do") then return false end
        if not Compile('"(I[^:]+):-du-') then return false end
        local _,webuserid2 = What()
        if webuserid2 then
                if not userid then UpdateLog( "沒有使用者提供流水號,故不檢查帳號正確性" ) return true end
                if userid:len() == 0 then UpdateLog( "沒有提供使用者流水號,故不檢查帳號正確性" ) return true end
                if webuserid2 ~= userid then UpdateLog( "提供的使用者流水號不正確" ) return false end
                return true
        else
                UpdateLog( "登入用的使用者帳號、密碼、流水號不正確" )
                UpdateLog( "帳號欄位:fdzone@shareme.seed.net.tw    (只是舉例不是真的能用)" )
                UpdateLog( "密碼欄位:pwfdzone-I0123456    (是下載者的使用者流水號)" )
                return false
        end
end

local function DownFile()
        local baseurl = GetUrl()
        if not GetUsername() or not GetPassword() then else
                DownUserMail, DownPassWord, DownUserID = GetLoginInfo()
        end
        if not LoginShareMe(DownUserMail, DownPassWord, DownUserID) then return false end
        if not GetHtml(baseurl) then return false end
        if not Compile('location="([^"]+Download[^"]+)".*?fileInfoName">([^<]+)<') then return false end
        local _, dl, fn = What()
        if not fn then UpdateLog( "找不到檔名" ) return false end
        if not dl then UpdateLog( "找不到連結" ) return false end
        SetFilename(fn)
        return GetFile("http://www.shareme.tw"..dl)
end

-------------------------------------------------------------------------
--main
-------------------------------------------------------------------------
function Download()
        local url = GetUrl()
        --http://shareme.seed.net.tw/UserFile.do?fileid=
        --http://shareme.seed.net.tw/file/DownloadRequest.do?fid=
        --http://www.shareme.tw/UserFile.do?fileid=
        --http://www.shareme.tw/file/DownloadRequest.do?fid=
        if url:find( "UserFile.do" ) or url:find( "DownloadRequest.do" ) then
                url = url:replace("UserFile.do?fileid", "file/DownloadRequest.do?fid")
                url = url:replace("shareme.seed.net.tw", "www.shareme.tw")
                SetUrl(url)
                return DownFile()
        else
                UpdateLog( "網址有誤" )
                return false
        end
end

function Upload()
        if not GetUsername() or not GetPassword() then else
                UpUserMail, UpPassWord, UpUserID = GetLoginInfo()
        end
        if not LoginShareMe(UpUserMail, UpPassWord, UpUserID) then return false end

        if not Compile('"/nhdfiles/public", "([^"]+)"') then return false end
        local _,public_folder = What()
        if not public_folder then        UpdateLog( "找不到公開資料夾" )        return false        end
        SetReferer("http://www.shareme.tw/file/FileManager.do")
        if not PostForm("http://www.shareme.tw/file/UploadFilesForm.do?ot=j&fid="..public_folder:replace(":", "%3A")) then return false end

        if not Compile('id_prefix = "([^"]+)".*?id_index = ([^;]+);') then return false end
        local _,id_prefix,id_index = What()
        if not id_prefix or not id_index then        UpdateLog( "找不到id_prefix,id_index" )        return false        end
        local uploadUUID = id_prefix.."_"..id_index
        AddFormField( "uploadid", "", false)
        AddFormFile( "file")
        --AddFormFile( "file", false)
        --AddFormFile( "file", false)
        SetReferer("http://www.shareme.tw/file/UploadFilesForm.do?ot=j&fid="..public_folder:replace(":", "%3A"))
        if not UploadFile("http://www.shareme.tw/file/UploadFiles.do?folderid="..public_folder.."&uploadUUID="..uploadUUID) then return false end

        --if not GetHtml("http://www.shareme.tw/file/view/uploadStatusReport.jsp?uploadUUID="..uploadUUID) then return false end
        --if not Compile('fileName>([^<]+)</fileName') then return false end
        --local _, fileName = What()
        --if not fileName then        UpdateLog( "找不到fileName" )        return false        end
        --if not GetHtml("http://www.shareme.tw/file/GetFiles.do?fid="..public_folder) then return false end
        --if not Compile('<id>([^<]+)</id><name>'..fileName..'</name>') then return false end
        --local _,fid = What()
        --if not fid then        UpdateLog( "找不到fid" )        return false        end
        --SetUrl("http://www.shareme.tw/file/DownloadRequest.do?fid="..fid)

        if not GetHtml("http://www.shareme.tw/file/GetFiles.do?fid="..public_folder) then return false end
        if not Compile('<id>([^<]+)</id><name>'..GetFilename()..'</name>') then return false end
        local _,fid = What()
        if not fid then        UpdateLog( "找不到fid" )        return false        end
        SetUrl("http://www.shareme.tw/file/DownloadRequest.do?fid="..fid)

        UpdateLog("上傳成功")
        return true
end

-------------------------------------------------------------------------
--end of file
-------------------------------------------------------------------------
引用:
-------------------------------------------------------------------------
後續
-------------------------------------------------------------------------
一共支援4種網址(不過為了方便腳本會強制改成某一個)
        --http://shareme.seed.net.tw/UserFile.do?fileid=
        --http://shareme.seed.net.tw/file/DownloadRequest.do?fid=
        --http://www.shareme.tw/UserFile.do?fileid=
        --http://www.shareme.tw/file/DownloadRequest.do?fid=    << 都會改成這個

如果發生下載後檔名都會變成 DownloadRequest.do的狀況
把前面網址改成
http://shareme.seed.net.tw/file/DownloadRequest.do?fid
http://shareme.seed.net.tw/UserFile.do?fileid
一般來說就可以下載了
引用:
-------------------------------------------------------------------------
圖文教學...(其實也就1張圖)
-------------------------------------------------------------------------


如圖
將位於freegrab目錄裡\Modules\webhost的shareme.lua用madedit開啟(有些人可能是seednet.lua)
將上面的原始碼複製貼上後照圖編輯(要輸入在""之間喔)
上傳部分就不說明了 其實也都差不多
其中流水號id為為每個帳號特有的
可以上傳一個小檔案 再看檔案連結就會看到了


也可以下載下面我傳的檔案
http://cn.ziddu.com/traditional/ ... KnZaqhkZSrYqyanZum5
一樣要用madedit開啟編輯
之後再複製到原目錄覆蓋即可

注意使用的freegrab版本
如果是1.2.3.4.4以上 也就是那種腳本打開是亂碼的也會不行用喔


需要下載較舊版的就點下面連結下載吧
http://cn.ziddu.com/traditional/ ... abKWlJiia7CclJs%3D9
[ 本帖最後由 葉兒 於 2008-7-3 03:48 PM 編輯 ]
本帖最近評分記錄
  • getawayok GJ +1 好用資訊 2008-6-27 08:27 AM
  • Lucifer GJ +1 精品文章 2008-6-4 09:35 PM

TOP

很好啊
你可否把這帖貼在小護的論壇呢?(被拖

TOP

對懶得登入下載的人是個好消息吧

不過個人是認為小檔的話登入倒是沒差啦

主要是大檔用免登入的方法會穩一點就是,這是自己的想法啦XD


因為SM對我來說只是丟動畫的空間..我很少拿來下載東西用XDD

TOP

是個很好的消息
一般來講可能還好, 不過要是一次下載一個26集以上的 這樣就可以放在家裡排程下載了
回到家就可以直接享用XD

TOP

終於看到V2的教學了
自從改成V2後還真不好用
一堆都改改掉了
搞的現在都不會用FreeGrab來下載
現在來看看文章如何下載嚕
就先在此說聲謝謝了

TOP

發新話題