0
Fotolog最近關閉了,我想備份那裏的所有地雷照片。尋找一些有用的東西,我發現這個項目:https://github.com/firstdoit/fotolog-backup錯誤:{[錯誤:getaddrinfo ENOTFOUND]代碼:'ENOTFOUND',errno:'ENOTFOUND',系統調用:'getaddrinfo'}
我安裝NPM和咖啡中的自述說明
但是當我嘗試運行:
coffee fotolog-build-index.coffee ticinowriting2
我收到此錯誤:
[email protected]:~/fotolog-backup$ coffee fotolog-build-index.coffee ticinowriting2
{ [Error: getaddrinfo ENOTFOUND] code: 'ENOTFOUND', errno: 'ENOTFOUND', syscall: 'getaddrinfo' }
在 「fotolog-累積索引」 的代碼是:
request = require 'request'
$ = require 'cheerio'
fs = require 'fs'
imageURLs = []
user = process.argv[2]
throw new Error("Usage: coffee fotolog-build-index.coffee <username>") unless user
buildIndexFromPage = (page) ->
request "http://www.fotolog.com.br/#{user}/mosaic/#{page}", (err, resp, html) ->
return console.error(err) if err
console.log "finished page #{page}... adding images"
images = $.load(html)("a.wall_img_container img")
images.map (i,img) ->
imageURLs.push $(img).attr("src").replace('_t','_f')
if images.length < 30
console.log imageURLs
console.log "got #{imageURLs.length} images"
fs.writeFileSync('index.json', JSON.stringify(imageURLs))
else
buildIndexFromPage(page + 30)
buildIndexFromPage(0)
對不起我的英文不好,從瑞士的IM,我知道相當一無所知這種代碼
謝謝你,我試着用info.fotolog.com和有效!非常感謝 –