Skip to content

Instantly share code, notes, and snippets.

View pgatour.py
#######################################################################
# Setup:
# $ python3 -m venv venv
# $ source venv/bin/activate
# $ pip install requests
# Usage:
# $ python pgatour.py
#######################################################################
import os
View eygbl.py
#!/usr/bin/env python
#######################################################################
# Setup:
# python3 -m venv venv
# source venv/bin/activate
# pip install lxml requests beautifulsoup4
#
# Usage:
# python eygbl.py
View sheahomes.js
/*
* $ npm init -y
* $ npm install puppeteer --save
* $ node sheahomes.js
*/
const puppeteer = require('puppeteer');
const url = 'https://www.sheahomes.com/new-homes/colorado/denver-area/parker/stonewalk-at-stepping-stone/';
async function getLot(page, url) {
await page.goto(url);
View sheahomes.py
import re
import json
import urlparse
import requests
from bs4 import BeautifulSoup
class SheaHomesScraper(object):
def __init__(self):
self.url = 'https://www.sheahomes.com/new-homes/colorado/denver-area/parker/stonewalk-at-stepping-stone/'
View lennar.py
import json
import requests
class LennarScraper(object):
def __init__(self):
self.url = 'https://www.lennar.com/Services/Rest/SearchMethods.svc/GetInventoryTabDetails'
self.session = requests.Session()
self.data = {
"CommunityID":"4531",
"pageState":{
View l3com_scraper.js
/*
* Companion code for article at http://toddhayton.com/2019/02/12/revisiting-taleo-with-puppeteer/
*
* Setup:
* $ mkdir scraper/
* $ cd scraper/
View campaignfinancemd.js
/*
* Companion code for article at http://toddhayton.com/...
*
* Setup:
* $ mkdir scraper/
* $ cd scraper/
* $ npm init -y
* $ npm install puppeteer --save
* $ npm install node-fetch --save
* $ npm install progress-stream --save
View l3com_scraper.py
#!/usr/bin/env python
import json
import requests
from bs4 import BeautifulSoup
class L3ComScraper(object):
def __init__(self):
self.session = requests.Session()
View rid_scraper.js
/*
* Companion code for article at http://toddhayton.com/2018/08/01/scraping-with-puppeteer/
*
* Setup:
* $ mkdir scraper/
* $ cd scraper/
* $ npm init -y
* $ npm install puppeteer --save
*
* Usage: