Skip to content

Instantly share code, notes, and snippets.

@manjeshpv
Created November 22, 2018 09:36
Show Gist options
  • Save manjeshpv/70a3dce8635a6b64ead69860b8ec8cfa to your computer and use it in GitHub Desktop.
Save manjeshpv/70a3dce8635a6b64ead69860b8ec8cfa to your computer and use it in GitHub Desktop.
scrap-workable.com.js
const fs = require('fs');
const urls = fs.readFileSync('./resources.workable.com.csv').toString().split('\n');
console.log('urls', urls)
const scrapeIt = require("scrape-it")
const out = [];
const loop = async( ) => {
for (let i=0; i<10;i++) {
const { data, response } = await scrapeIt(urls[i], {
title: "h1"
, responsibilities: "div.post-content.col-xs-12.col-md-9.col-md-push-3 > div.entry-content.article-content > div > ul"
, brief: 'div.post-content.col-xs-12.col-md-9.col-md-push-3 > div.entry-content.article-content > p:nth-child(3)'
, responsibilities: 'div.post-content.col-xs-12.col-md-9.col-md-push-3 > div.entry-content.article-content > ul:nth-child(7)'
})
out.push(data)
}
fs.writeFileSync('hello.json', JSON.stringify(out));
}
loop()
@manjeshpv
Copy link
Author

manjeshpv commented Nov 22, 2018

Getting Urls from Listing page:

  1. Open https://resources.workable.com/job-descriptions/
  2. Open inspector(F12),
  3. Goto console tab

Execute:

urls = [];
jQuery('.box-white li > a').each((x, y) => urls.push(y.href)); urls.join('\n')

from above file u can get csv

save it a file resources.workable.com.csv

copy this gist and execute it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment