Skip to content

Instantly share code, notes, and snippets.

@franperezlopez
franperezlopez / scraper.ts
Last active December 4, 2018 05:19
nightmare + vo
const Nightmare = require ("nightmare");
const vo = require("vo");
function scrape (url: string, dataScraper: Function, urlScraper: Function,
injectJQuery: boolean = true, validate: Function = null)
{
var item : any = null, urls: any = null;
// do not show window, do not load images (reduce time to ready())
var nightmare = Nightmare({show: false, pollInterval: 800, webPreferences: {images: false}});
---
title: "Untitled"
output: html_document
---
@franperezlopez
franperezlopez / codechunk
Last active May 1, 2016 23:15
r-markdown
```{r include=F}
options(width=120)
set.seed(3874)
options(error=function() {save.image(file="error.rmd.RData")})
```