Skip to content

Instantly share code, notes, and snippets.

'''
>tesla-inventory-price-scraper.py<
@Author: Maxwell Mowbray
@Email: mmowbray@mentlegen.com
@Date: April 2020
@Description:
This script scrapes Tesla's car inventory website and alerts the user if a car under a certain price appears.
It can easily be adapted to do other things with the results, such as alert you when a specific car with a specific trim/color/wheel size appears in inventory.
@scrapehero
scrapehero / ebay_scraper.py
Last active April 21, 2024 18:32
Python 3 Code to scrape prices from ebay.com
import argparse
from pprint import pprint
from traceback import format_exc
import requests
import unicodecsv as csv
from lxml import html
def parse(brand):
@matterson11
matterson11 / 20_day_moving_average.php
Last active January 22, 2021 12:29
Building a site that uses the Yahoo Finance Api to gather data on individual company shares. The Yahoo Api provides the 50 day and 200 day moving averages. I built this function to calculate the moving average over 20 working days.
<?php
require 'vendor/autoload.php';
// https://github.com/scheb/yahoo-finance-api
// The extremely useful scheb yahoo finance api is used extensively through our site
function TwentyDayAvg($symbol)
{
$client = new Scheb\YahooFinanceApi\ApiClient();