Questions tagged [cheerio]
Questions about Cheerio, an implementation of core jQuery designed specifically for the server.
1,652
questions
2
votes
1
answer
26
views
How to get element in MathJax when crawl data?
I'm crawling a website that has the following tags by "cheerio", how can I get the entire text of the p tag and also **span * *with attribute "data-mathml".
<p><strong ...
0
votes
1
answer
42
views
DOM manipulation of proxy response in express node using Cheerio and http-proxy-middleware
I've setup proxy server in express Node, which is working fine.
const express = require('express');
const { createProxyMiddleware } = require('http-proxy-middleware');
const app = express();
// ...
-2
votes
0
answers
10
views
How can I give function to a div when its clicked in CheerioJS and ExpressJS?
I am trying to make a website with ExpressJS and I want to give a div a function when its clicked.
I tried to give click() method like in jquery but it didn't work.After that i tried to give div.attr(&...
0
votes
0
answers
11
views
Using cheerio in reactjs to replace text before rendering it to webpage?
I am using reverseproxy to take some blog pages from my django backend and style them according to Header/Footer etc of the react frontend.
const { createProxyMiddleware } = require('http-proxy-...
-5
votes
0
answers
51
views
Count number of elements/tags at top level of a given string of HTML/XML in Node.js [closed]
I'm trying to write a function in JavaScript, that can correctly identify how many top level elements exist in a given string of HTML/XML (in this case it's a Vue JS Template).
I need to do this in ...
0
votes
1
answer
29
views
Programatically detect client rendered sites
I'm building a web scrapper and currently I'm using puppeteer to extract the content. But the problem with puppeteer is that it takes a lot of ram and sometimes my server runs out of memory when I ...
1
vote
1
answer
32
views
Set axios response type to UTF-8 for web scraping in Node.js
I'm scraping google search given a query, but the thing is that the titles I scrape are given in the ISO-8859-1 and I need them in UTF-8 for the spanish language. I get the 10 first titles but some of ...
1
vote
1
answer
50
views
Scrape google search using axios and cheerio (Node js)
I want to scrape the google search given a query, but I'm not able to get the css_identifiers to work on this code:
const axios = require("axios");
const cheerio = require("cheerio"...
0
votes
0
answers
16
views
Cheerio td values combined into one number [duplicate]
I am trying to show rankings in fencing using cheerio and find that the rankings, points and T-P (not sure what T-P is in this case and am going to remove this) are all combined.
Example:
rank: 1
...
0
votes
0
answers
17
views
Cheerio web scraping leads to multiple html elements being added together [duplicate]
Im using cheerio but dont know how to access lists inside lists. so far it adds html elements not separated but adds them together. What am I doing wrong? Very helpful for any help!!!
the html:
...
&...
0
votes
0
answers
15
views
Unable to extract link in href within <a> tag using Cheerio
I'm trying to extract the audiobook link in Amazon and i'm pretty sure I got the selector part right, but it can't find the element
function queryAudiobooklink($) {
const audiobookElement = $('li....
0
votes
1
answer
76
views
"TypeError: Cannot read properties of null" when using regex match in cheerio webscraping
I want to scrape what is in brackets from this html:
<dl class="ooa-1o0axny ev7e6t84">
<dd class="ooa-16w655c ev7e6t83">
<p class="ooa-gmxnzj">Cekcyn (Kujawsko-pomorskie)&...
0
votes
2
answers
68
views
Cheerio - How to grab the text following an element?
Using cheerio, how can i grab 2 separate html contents which follow an html element, and not are inside a specific html element?
what i want to grab is from:
<div>
<time>
<svg>....
0
votes
0
answers
17
views
problem in web crawling using cheerio and axios
const axios = require('axios');
const cheerio = require('cheerio');
axios({
// URL
url: 'http://nstatic.dcinside.com/company/rules/service_policy.html',
method: 'GET',
})
// success
...
0
votes
1
answer
35
views
Using Cheerio to scrape for information
I'm using Nodejs with the package Cheerio to collect information on a website, I am struggling to collect the information after iterating through to store the information into an array.
The text I ...
0
votes
0
answers
21
views
How to Get Consumer Price Index Data from Bureau of Labor Statistics with Cheerio/Javascript
I used to import table data from US Bureau of Labor Statistics with this code below. But it doesn't work anymore. Obviously the website must be changed, but I couldn't figure the root cause, although ...
0
votes
0
answers
8
views
Cheerio/Phantom scraping not returning page/working as I thought
const axios = require("axios");
const cheerio = require("cheerio");
const phantom = require('phantom');
const pretty = require('pretty');
const main = async () => {
const ...
0
votes
1
answer
41
views
Getting the error: Argument of type {JSON Object} is not assignable to the parameter of 'never'
I'm trying to do some web scraping using typescript, axios and cheerio but I'm running into issues with this error:
Argument of type '{ contestcode: string; contestname: string; conteststart: string; ...
-2
votes
1
answer
36
views
Scraping a site with JS (2)
i am trying to scrape a web page, here is the JS code:
const axios = require('axios');
const cheerio = require('cheerio');
const r = 459230;
const link = 'https://www.discogs.com/sell/release/';
...
1
vote
1
answer
25
views
Node.js Cheerio parser breaks UTF-8 encoding of <link> hrefs
I have a basic index.html file that I load with cheerio, modify the content of a tag, then rewrite the index.html.
My issue is that in that index.html, i have a tag in which the href has a '&' ...
1
vote
1
answer
31
views
Undefined 'href' attribute/jQuery
So I recently found out about webscraping using axios and cheerio. I thought it would be cool if I wrote a program in javascript that would get the download links of all the episodes of a series ...
-1
votes
1
answer
27
views
How to extract a token and other filds from the http response > body> script tag > window.location.href in postman?
I want to extract token, cookieToken, user_id, refresh_token and expire_date from postman.
html response:
sampleWebSite Accounts
var module_hash_id_storage = 1;
...
0
votes
0
answers
15
views
By using cheerio is there a way to know if the attribute is with an initial value or not?
By using Cheerio is there a way to know if the attribute is with an initial value or not?
<option value="" disabled selected>Please select</option>
<option value disabled ...
0
votes
0
answers
32
views
Get data from client side html into google sheets using cheerio - columns not populating
I'm looking pull data from 248 different URLs with different page structures. The majority of the pages list email addresses in the html right behind a mailto: string so I've used said string as an ...
2
votes
2
answers
35
views
select sibling of b tags just under them [duplicate]
Using I Cheerio I want to select the text of theses parts:
this is the first area to select
this is the second area to select
<div class="lun boxBd boxMain" t="page">
<div id="boxWrd" ...
1
vote
3
answers
121
views
How to load and manipulate an HTML fragment from a string with Cheerio?
I'm struggling trying to load an HTML fragment with Cheerio.
var htmlString = '<div class="artist"><i class="user blue circle icon"></i> Skyy</div>';
var $ =...
0
votes
1
answer
43
views
why does the scraping from a specific website not work well?
I want to scrape all the alertDetails from this url - https://www.oref.org.il/12481-en/Pakar.aspx
I wrote this code but I think beacause the "In the past week" isn't Active, it can't find ...
1
vote
2
answers
75
views
Get image from figure tag using cheerio on xml
I am trying to extract the img src from the following xml tag inside of an item
I am calling cheerio.load on my response data like so
const $ = cheerio.load(response.data, { xmlMode: true });
$(&...
1
vote
1
answer
30
views
Store data of specific value in an object using Cheerio JS
I am practicing web scraping using Node and Cheerio JS and I need help.
I have this sample table and I am confused about how I can fetch the Home Odds and Away Odds of each match (tr) and store them ...
0
votes
1
answer
60
views
Getting specific text from an XML element in cheerio with multiple tags
using cheerio to parse XML, I am trying to get only the user readable description from the tag. I.E.
<description><![CDATA[<p><img src="https://www.boxingnews24.com/wp-content/...
0
votes
0
answers
14
views
Cheerio does not retrieve disabled attribute
I am using Node.js and Cheerio
Element from page
<button
type="submit" name="add" id="addToCart-product-template"
class="btn btn--wide btn--add-to-cart ...
0
votes
0
answers
42
views
Rewrite jQuery function for updated HTML DOM structure
Hi I'm looking to rewrite/update the exportRound JavaScript function which parses Jeopardy! round data from j-archive.com into a 'result' object that is consumed by rest of the program. It appears ...
0
votes
1
answer
41
views
Cheeriojs retrieve all text and attributes from select/option
I have the following code in a web page, I have to retrieve from the second select all the option texts and attributes to put them in a variable.
I tried like this but it's not working, no array of ...
0
votes
1
answer
35
views
HTML Scraping with Cheerio
I have a hard time finding out how to iterate the children of paragraph elements using Cheerio.
<html>
<head>
</head>
<body>
<p>Hello, this is me - Daniel</p>
<p&...
0
votes
1
answer
102
views
Scraping ebay image thumbnail with Cheerio and Nodejs
I am able to get title, price, date, etc., with Nodejs, Axios and Cheerio from an ebay search, but I am having trouble getting the img thumbnail url into my items.json file.
Here is my code to get the ...
-3
votes
1
answer
56
views
Scraping website with nodejs and getting an empty result
I have no idea why I don't get any result when scraping basketball-reference page.
I want to get the Pace from https://www.basketball-reference.com/boxscores/202304200GSW.html. There are 2 Pace tags ...
0
votes
2
answers
59
views
Chain method from function
Trying to understand chinning method, can be math like, cheerio/jQuery like, gonna shorten and replace with my own methods when things get too long.
//It will help me get shorten methods in complex ...
1
vote
1
answer
97
views
How can I get the full text of a Title from Google Scholar using Cheerio?
I am using axios to send a get request on google scholar. With cheerio I access the data. When the title is too long I get: title: 'Comparison of live-birth defects after luteal-phase ovarian ...
1
vote
1
answer
40
views
How can I get the data of the parts of the site that need to be loaded with the cheerio?
I want to get the rows of this site with cheerio, but because the site needs to be loaded, it only shows me the first 10 rows. How can I get all rows of this table?
coinmarketcap.com
On this site, ...
0
votes
0
answers
18
views
How to handle errors in promise.all
I am running a web scraper using the node package cheerio on AWS lambda. The scraper makes a request to various urls and returns prices from each url based on a predetermined list of css class ...
0
votes
1
answer
51
views
Get specific data from site using Google apps script
I am trying to get 4 data points from website, I am able to get first, but due to my novice skills I am having difficulty in getting other three. Here is the screenshot of webpage:
I was able to get ...
0
votes
1
answer
46
views
Unable to scrape holders value from website
I am using cheerio and node.js and trying to scrape the total number of holders from this website. I can scrape this either from under the Market Overview section
or the token distribution section ...
0
votes
1
answer
61
views
Replace unicode characters in html returned from node js web scraper
I have a web scraper that uses cheerio. My goal is to get a list of all the links on the page, however I have noticed that some links do not show up due to unicode greater than and less than ...
0
votes
1
answer
35
views
Cheerio returning non-existing matches?
I am trying to scrape the contents from a website that has a very chaotic structure and many different styles of content in the same document and this is driving me nuts...
If anyone finds a more ...
0
votes
1
answer
133
views
Cannot find the img tag while web scraping with Cheerio
I was practising web-scraping in nodejs along with cheerio when I encountered an issue.
Link of the website
(unfortunately I do not have enough reputation to post images so I will have to provide you ...
1
vote
1
answer
36
views
Header value not used as object key
I'm working with node , puppeteer and cheerio, and I'd like to scrape the header and footer info of the table
I have the following :
const data = await page.content(); // get all page html
const $ = ...
0
votes
2
answers
52
views
Selecting table footer values with cheerio
After scraping a page , I have selected the footer of a table using cheerio with:
const $ = cheerio.load(data);
const foot = $('#tblAcctBal > tfoot > tr');
o = $(foot).html();
console.log(o);
...
0
votes
0
answers
17
views
Returning a variable from a .then() method in Typescript [duplicate]
`Hello, I am a first year computer science student who tries to make a simple web crawler in TypeScript for one of my beginner couesess. I've decided to use the cheerios and axion library, but have ...
0
votes
0
answers
30
views
Cheerio not selecting class
I am attempting to build a web scraper that will ultimately list an array of properties from this website called landa. Learning Cheerio to do this, and I seem to have been able to create an array of '...
0
votes
0
answers
51
views
How to run inquirer.prompt on every occurance of element using cheerio library?
I'm currently developing the console application which allows users to change the values inside HTML files. I'm using the cheerio library to find in the HTML file every occurrence of the class called &...