You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
app.listen(port, () => {
console.log(Example app listening at http://localhost:${port})
})
async function getPostsByHashtag(hashtag) {
// Scrape 100 video posts from the hashtag feed
try {
const options = { count: 10};
const result = await instaTouch.getUserMeta(hashtag, options);
console.log(result);
return result;
// the result object has a 'collector' property (array), that contains the posts
} catch (error) {
console.log(error);
}
Initially I used it normally nothing happened. After 1 day I turn it on and use it again it gives an error. Hope anyone can help me to fix this error.
`const express = require('express')
const app = express()
const port = 3333
const instaTouch = require('instatouch');
app.get('/', (req, res) => {
res.send('Hello World!')
})
app.get('/posts', async(req, res) => {
const hashtag = 'playstation';
const result = await getPostsByHashtag(hashtag);
res.send(result)
})
app.listen(port, () => {
console.log(
Example app listening at http://localhost:${port}
)})
async function getPostsByHashtag(hashtag) {
// Scrape 100 video posts from the hashtag feed
try {
const options = { count: 10};
const result = await instaTouch.getUserMeta(hashtag, options);
console.log(result);
return result;
// the result object has a 'collector' property (array), that contains the posts
} catch (error) {
console.log(error);
}
}`
Error:` Wrong response content type! Received: text/html; charset=utf-8 Expected: application/json
at Promise (/home/vanquy/Desktop/learn-cheerio/node_modules/instatouch/build/core/InstaTouch.js:97:27)
The text was updated successfully, but these errors were encountered: