This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const request = require('request-promise-native'); | |
const cheerio = require('cheerio'); | |
const scrap = async (url, selector) => { | |
let html; | |
try { | |
html = await request(url); | |
} catch (err) { | |
console.error(`Url no encontrada: ${url}`); | |
return ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Extraido de | |
// https://github.com/wesbos/JavaScript30/blob/master/04%20-%20Array%20Cardio%20Day%201/index-FINISHED.html | |
/* global describe it */ | |
// Usaremos el `assert` de node | |
const assert = require('assert'); | |
// ## Unos datos que usaremos para nuestros ejemplos | |
// ### Inventores |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Comment { | |
_id: String! | |
# The comment's content. | |
content: String! | |
# The comment timestamp. This field is indexed to enable sorted pagination. | |
createdAt: String! | |
} | |
type Mutation { | |
# Comment on an event. |