2016-03-20 68 views
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,我知道相當一無所知這種代碼

回答

0

這錯誤意味着DNS解析器無法解析主機名(www.fotolog.com.br)爲IP地址。我可以證實這確實是這種情況(得到NXDOMAIN)。所以除非你有IP地址,否則你可以做的事情不多。

你可以嘗試只www.fotolog.com,因爲這似乎解決然而,迄今爲止在該網站上的消息表明數據應2月20日之前已經下載,2016年

+0

謝謝你,我試着用info.fotolog.com和有效!非常感謝 –

相關問題