This file contains hidden or 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
''' | |
>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. |
This file contains hidden or 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
import argparse | |
from pprint import pprint | |
from traceback import format_exc | |
import requests | |
import unicodecsv as csv | |
from lxml import html | |
def parse(brand): |
This file contains hidden or 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
<?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(); |