instagram-screen-scrape
Advanced tools
Comparing version 1.0.0 to 1.0.1
// Generated by CoffeeScript 1.9.3 | ||
(function() { | ||
var InstagramPosts, JSONStream, Readable, getPosts, request, | ||
var InstagramPosts, Readable, getPosts, jsonRequest, | ||
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, | ||
@@ -10,7 +10,5 @@ extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, | ||
request = require('request'); | ||
jsonRequest = require('./util').jsonRequest; | ||
JSONStream = require('JSONStream'); | ||
/** | ||
@@ -26,5 +24,3 @@ * Make a request for a Instagram page, parse the response, and get all the | ||
getPosts = function(username, startingId) { | ||
var outStream; | ||
outStream = JSONStream.parse('items.*'); | ||
request.get({ | ||
return jsonRequest('items.*', { | ||
uri: "https://instagram.com/" + username + "/media/", | ||
@@ -34,10 +30,3 @@ qs: { | ||
} | ||
}).on('response', function(resp) { | ||
if (resp.statusCode === 200) { | ||
return resp.pipe(outStream); | ||
} else { | ||
throw new Error("Instagram returned status code: " + resp.statusCode + " for user '" + username + "' and startingId: '" + startingId + "'"); | ||
} | ||
}); | ||
return outStream; | ||
}; | ||
@@ -44,0 +33,0 @@ |
{ | ||
"name": "instagram-screen-scrape", | ||
"description": "scrape public instagram data w/out API access", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"author": "Sean Lang <slang800@gmail.com>", | ||
@@ -21,2 +21,3 @@ "bin": { | ||
"isstream": "^0.1.2", | ||
"json-schema": "^0.2.2", | ||
"mocha": "^2.2.4", | ||
@@ -23,0 +24,0 @@ "should": "^5.2.0" |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
47314
9
230
0
5