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
7
votes
3 answers

Alexa AWS Error: task timed out after 3.00 seconds

I'm trying to write an Alexa skill that uses request.js & cheerio.js to do some web scraping for data. When I run it locally it works fine, as expected but on the AWS lambda instance I keep getting a timeout error as it takes longer than 3 seconds…
Miah Thompson
  • 239
  • 2
  • 12
7
votes
1 answer

cheerio / jquery selectors: how to get text in tag a?

I am trying to access links on a website. The website looks like the first code sample and the links are in different div-containers:
7
votes
1 answer

Create new element in cheerio

What is the best way to create a new element in cheerio? May be: cheerio.load('
  • something in here!
  • ') or $('li', '
  • bla, bla, bla, ...
  • ')
    Clite Tailor
    • 438
    • 5
    • 14
    7
    votes
    4 answers

    How do I get the absolute path for '' in node from the a response.body

    So I want to use request-promise to pull the body of a page. Once I have the page I want to collect all the tags and get an array of src's of those images. Assume the src attributes on a page have both relative and absolute paths. I want an…
    bsego
    • 73
    • 1
    • 3
    7
    votes
    3 answers

    how to result the contents of a javascript variable using cheerio (jquery like selectors, but no dom)

    There is a large html file with many javascript tags in it. I'm trying to scoop out the contents of that variable. The variable name stays the same but the contents change on every request. examplefile.html