2010-04-27

Windows Live SkyDrive 的批次下載問題 (Batch download files in Windows Live SkyDrive)

即使將文件名稱有規律地上載到 Windows Live 的 SkyDrive 中
要批次下載存放 SkyDrive 中的文件依然不能
Although upload the file and named with regular order to SkyDrive
You still cannot batch download the files

當用戶上載文件到 SkyDrive 後,SkyDrive 會指派另一條連結
而且這連結好像有時效性,會在一段時間後再次指派另一條連結
若果要下載大量文件時用戶基本上只能一個一個檔案手動下載
When user upload files to SkyDrive, SkyDrive will generate and redirect to the other link
And it has time limit that, it will generate other link soon
If need to download a large number of file, user always download them manually

注意一
由於 SkyDrive 不符合 XML 因此分析不要使用 XML Parser
但是檢查原始檔 spPreviewLink 的位置需要逐行檢查,因此效率比較慢
Situation 1
SkyDrive does not validate with XML, so you cannot parse it with XML Parser
get the source file with tag id spPreviewLink need to parse it line by line, it is not efficiency

注意二
因為文件連結位置的特殊字元都會以 ASCII code 表示 (? 即是 ?)(: 即是 :)(/ 即是 /)
所以在獲得文件連結位置後還需要處理特殊字元
Situation 2
All special characters will use ASCII code to express of the redirect link
(? stand for ?)(: stand for :)(/ stand for /)
When you find the redirect link, you need to re-construct the redirect link

注意三
若果文件為不需要下載的格式,如各種通用圖像格式 (JPG、GIF、PNG、BMP 等)、文字格式 (TXT、HTML 等)
連結末端不會加上 ?download
但若果件為需要下載的格式,則會加上 ?download
Situation 3
If file is an image format (JPG, GIF, PNG, BMP...) or text format (TXT, HTML...) the redirect link will not contain ?download
Otherwise the redirect link will contain ?download

不管怎樣,得到所有需要下載的文件的連結後,便可以用任何批次下載工具下載這些檔案
Finally, after you get the redirect links, then you use any batch download software to download those files

沒有留言 :

張貼留言