Skip to content

Instantly share code, notes, and snippets.

View bnnadi's full-sized avatar

Bisike bnnadi

  • Winter Springs. FL
View GitHub Profile
@bnnadi
bnnadi / gist:1c56275c3b048a725ce5
Created April 22, 2015 15:26
PHP Streaming video player
function watch()
{
$file = $this->getAbsolutePath();
$name = $this->getUploadedName();
$mime_type = $this->getMimeType();
/*
This function takes a path to a file to output ($file),
@bnnadi
bnnadi / scrape
Last active August 29, 2015 14:19
Basic Python Single Page Web Scraper
from bs4 import BeautifulSoup
from urllib2 import urlopen
from time import sleep # be nice
import json
# insert any website you want
BASE_URL = "http://plasticscolor.com"
def make_soup(url):
html = urlopen(url).read()
return BeautifulSoup(html, "lxml")