title: use nodejs to download bing's wallpaper
body: <p>i want to download bing's todays wallpaper by node.js,</p>
  
  <p>first of all,<strong>i can download large pictures from some other sites</strong>,</p>
  
  <p>but i can't download the pic from bing,even though i can see the pic in my browser</p>
  
  <p>the example picture src is : "http://www.bing.com/az/hprichbg?p=rb%2fYosemiteSnow_EN-US7191433727_1920x1200.jpg"</p>
  
  <p>here's my core code</p>
  
  <pre><code>var download_file_httpget = function(file_url) {
      var options = {
          host: url.parse(file_url).host,
          port: 80,
          path: url.parse(file_url).pathname,
          headers: {}
      };
      var file_name = '11.jpg';
      var file = fs.createWriteStream(download_path + "\\" + file_name);
      http.get(options,function(res) {
          res.on('data',function(data) {
              file.write(data);
          }).on('end',function() {
              file.end();
              console.log('download success');
          });
      });
  };
  </code></pre>
  
  <p>for example,the orginal pic's size is 200k,but it only download 20k,and i doubt that it is because of the 'referer' in the header,when i add the header,the problem fixed in some oher sites,but it still dosen't work for bing</p>