Comments (7)
Just Tried the post id example and got this error:
(node:13776) UnhandledPromiseRejectionWarning: ReferenceError: XMLHttpRequest is not defined
the first thing I did was to install hmlhttprequest manually with npm, but no changes....
Are you using this library in node.js?
Try
const XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest;
// For versions of node earlier than 12.x, use this globalThis polyfill:
(function() {
if (typeof globalThis === 'object') return;
Object.defineProperty(Object.prototype, '__magic__', {
get: function() {
return this;
},
configurable: true
});
__magic__.globalThis = __magic__;
delete Object.prototype.__magic__;
}());
if (!globalThis.XMLHttpRequest) {
globalThis.XMLHttpRequest = XMLHttpRequest;
}
from nanogram.js.
hey, sorry for the late reply,
yes I do use it with using node.js
and I just woke up, add this code to the file, and launched the code for the 1st time, and got this error:
Error: [nanogram.js] It looks like your network has been temporary banned because of too many requests.
from nanogram.js.
it was the 1st time and it's a little bit confusing!
from nanogram.js.
it was the 1st time and it's a little bit confusing!
Try this:
const XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest;
const getMediaByUsername = require('nanogram.js').getMediaByUsername;
(function () {
if (typeof globalThis === 'object') return;
Object.defineProperty(Object.prototype, '__magic__', {
get: function () {
return this;
},
configurable: true,
});
__magic__.globalThis = __magic__;
delete Object.prototype.__magic__;
})();
if (!globalThis.XMLHttpRequest) {
globalThis.XMLHttpRequest = XMLHttpRequest;
}
getMediaByUsername('instagram').then((media) => {
console.log(media);
});
Does it work for you?
from nanogram.js.
it came with the same Error: [nanogram.js] It looks like your network has been temporary banned because of too many requests.
error!
from nanogram.js.
it came with the same
Error: [nanogram.js] It looks like your network has been temporary banned because of too many requests.
error!
Seems like Instagram detected bot activity on your end. It works fine for me.
from nanogram.js.
However, im gonna try with vpn or even on vps later, thank u!
from nanogram.js.
Related Issues (16)
- Add contributor HOT 2
- how to get next page? HOT 1
- Module not found: Recursion in resolving HOT 3
- Nanogram stopped working (Cannot read property '0' of undefined) HOT 7
- Remove Fetch API HOT 10
- Unable to commit anything in the repo due to husky failure HOT 2
- Class methods tree-shaking
- TypeError: i.ProfilePage is undefined HOT 5
- Not working image parse HOT 3
- TypeError: Nanogram is not a constructor HOT 1
- Profile picture HOT 4
- Plugin stopped working overnight HOT 2
- Network has been temporary banned because of too many requests HOT 1
- Reel Download HOT 6
- blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nanogram.js.