Comments (5)
Thanks @ccarollo for your kind words. I'll look into this problem.
In the meantime could you fix the formatting of this issue? It's making everything a link - I think you need to indent the outermost <div>
s 4 spaces to kick in the correct formatting.
from cheerio.
I couldn't get the formatting resolved so I went ahead and made a gist. I have update the original issue with the gist url. Hope this helps and thanks for looking into the issue.
from cheerio.
This issue is because of a recursion problem in htmlparser2. I've sent a patch which was accepted, but the current release still doesn't have it. If you would like to fix the issue, go to your nearest ./node_modules
folder and navigate to htmlparser's ./lib
folder. Then change the 18th line of DomUtils.js
from:
childs = filterArray(test, childs, limit);
to
childs = filterArray(test, childs, recurse, limit);
Hope this helps.
from cheerio.
@ccarollo Did this get resolved?
from cheerio.
Yes this appears to be resolved. It looks as though the bug in HTMLParser2 was the culprit and since @siddMahen's fix was included in version 2.1.2 of HTMLParser2 all is good. Thanks for everyones help.
from cheerio.
Related Issues (20)
- Can't set existing attribute as undefined HOT 1
- Custom self closing label parsing error, resulting in incorrect document structure
- Can't start telegram bot HOT 3
- issue with custom tags defined in head HOT 2
- Incorrect code example in intro documation
- Multiple html tags are deleted HOT 2
- TypeError: cheerio.fromURL is not a function HOT 6
- How to "replaceWith" on plain text, which is not a DOM Elements? HOT 5
- Unsafe legacy renegotiation disabled
- text() method merges text parts HOT 3
- Bug: Crawler reached the maxRequestsPerCrawl limit of 1 requests and will shut down soon HOT 1
- Bug: XML tags with mixed case, when using lowerCaseTags: true, selectors will be lowercased before comparing with the xml tag name
- exporting function from battiers
- Error with nextjs 14 HOT 1
- Cherrio is unable to retrieve content with property of og in the meta tag HOT 3
- If the page is SPA (such as Vue), can't I use Cheerio to retrieve the content of the website that has been fully loaded HOT 1
- whitespace normalization removes NBSP chars in xmlMode HOT 1
- Can´t select elements based on their position in the document HOT 2
- Live Editor Result Panel Blank
- how to add defer to script tag HOT 1
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 cheerio.