Questions tagged [cheerio]

Questions about Cheerio, an implementation of core jQuery designed specifically for the server.

Implementation of core jQuery designed specifically for the server. https://github.com/cheeriojs/cheerio

1646 questions
0
votes
1 answer

Missing Callback Error Prevents Script from Proceeding

I'm currently writing a script that crawls a number of sites and dumps the results in a mongodb. When I run a bulk seed file (so I don't have to run each crawler and individual seed manually), The first crawler completes, but the following error…
mkayen
  • 27
  • 5
0
votes
1 answer

Cheerio extract a link without a closing tag

I am making a crawler in cheerio and nodejs and I am trying to extract a without a closing tag. It looks like this: http://www.example.com ... how would I extract that link? trying to extract…
cj2415
  • 1
  • 1
0
votes
1 answer

Chrome automatically changed DOM, or different from what cheerio gets

So I was writing a web scraping application using cheerio.js. Things was going well until I noticed that cheerio $('tbody tr') return nothing, while when I open the same website in chrome, jquery $('tbody tr') return all the rows in table body. In…
Nam Thai
  • 841
  • 1
  • 10
  • 26
0
votes
4 answers

'Undefined Is Not A Function' while using arrays in NodeJS

I am running node with cheerio. I have this function which needs to display an attribute value of an element contained in an array. for (var row = 0; row < array.length; row++) { console.log("Row Length: " + array[row].length); for (var…
NeelDeveloper
  • 139
  • 1
  • 15
0
votes
1 answer

Returning loop of javascript http requests with promises

I have a function which is looping through an array of urls to be parsed through requests. Because however, I need the for loop to be encompassing the request I don't know how I can return the array. If I have the return of promises outside of the…
user147910
  • 37
  • 1
  • 7
0
votes
1 answer

cheeriojs has error: exports.load.initialize

I'm using cheeriojs to do web scraping. I'm having problem after load the body into cheerio. I can see the body is well formatted html code. I'm getting some error like exports.load.initialize. I couldn't using the css selector any…
Peter Huang
  • 972
  • 4
  • 12
  • 34
0
votes
1 answer

Edit redirect uri Request.js after login

I'm using request.js and cheerio.js to scrape a password protected website. Is it possible to edit the response uri such that I could scrape another page other than the one I'm being redirected to?
Kreutzer
  • 328
  • 4
  • 12
0
votes
2 answers

Remove Characters from string

So i have this: $('#chapters').filter(function() { var volume_elms = $('.volume'); var chapter_elms = $('.chlist'); for (var i = 0, l = volume_elms.length; i < l; ++i) { var elm =…
meiwaku
  • 15
  • 5
0
votes
1 answer

Unable to Manipulate DOM with cheerio on nodejs

I'm running a simple program with the server side on Node with cheerio. Given below are the codes: Server Side: /** * Module dependencies. */ var express = require('express') , routes = require('./routes') , user = require('./routes/user') …
NeelDeveloper
  • 139
  • 1
  • 15
0
votes
1 answer

Undefined while using Cheerio on Node.js

I am trying to run Cheerio on node.js with ejs as my template. Whenever I run the server, I get 'undefined' at the the 'console.log'. Given below is my code. Server side app.js /** * Module dependencies. */ var express =…
NeelDeveloper
  • 139
  • 1
  • 15
0
votes
1 answer

Any way to get nearby html nodes different from current node's tag name in NodeJS?

Let's say I have the following html code.. And I want to look at the nodes around an element that's…
Arrow
  • 691
  • 2
  • 7
  • 15
0
votes
1 answer

Cheerio.js and working with subsets of the dom

I've having some issues (probably misunderstanding soemthing most likely) when reading the dom and using cheerio.js to do so from with a simple node.js app. I'm using request to grab the html from a website and cheerio to navigate it find certain…
menapole
  • 1,166
  • 1
  • 11
  • 22
0
votes
3 answers

Parsing HTML File using cheerio

I have a HTML Document which I would like to parse. I am trying to use cheerio to parse the HTML file.
  • . . …
user1692342
  • 5,007
  • 11
  • 69
  • 128
0
votes
0 answers

Uncaught Error: Cannot find module 'cheerio' Nodewebkit

I am trying to develop a node webkit application and trying to use the cheerio library. I have imported it using var cheerio = require("cheerio"); However when I run the program, I get the following error: Uncaught Error: Cannot find module…
user1692342
  • 5,007
  • 11
  • 69
  • 128
0
votes
1 answer

Xray Selector not returning value

I have the following snippet running the latest version of x-ray npm module. I expect to the Meta and Metatags elements to be populated but they are not when i print out obj. What am i doing wrong? var Xray = require('x-ray'); var x =…
TommyK
  • 416
  • 2
  • 6
  • 24
1 2 3
99
100