Fotolog最近关闭了,我想在那里备份我所有的照片。为了寻找有用的东西,我找到了这个项目:https://github.com/firstdoit/fotolog-backup
我按照自述文件中的说明安装了npm和coffee。
但是当我试图跑的时候:
coffee fotolog-build-index.coffee ticinowriting2我收到这个错误:
doc@doc-mtn:~/fotolog-backup$ coffee fotolog-build-index.coffee ticinowriting2
{ [Error: getaddrinfo ENOTFOUND] code: 'ENOTFOUND', errno: 'ENOTFOUND', syscall: 'getaddrinfo' }"fotolog-build-index“中的代码是:
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)很抱歉我的英语不好,我来自瑞士,我对这种代码一无所知。
发布于 2016-03-21 07:35:47
该错误意味着DNS解析器无法将主机名(www.fotolog.com.br)解析为IP地址。我可以证实这确实是事实(dig获取NXDOMAIN)。所以,除非你有IP地址,否则你无能为力。
你可以只尝试www.fotolog.com,因为这似乎还没有解决,但是该网站上的消息表明数据应该在2016年2月20日之前下载。
https://stackoverflow.com/questions/36119600
复制相似问题