This file contains 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 praw | |
import requests | |
import sqlite3 | |
# A simple scraper for grabbbing images from the front page of a given subreddit and storing them in a DB | |
# Create database | |
conn = sqlite3.connect('imgdb.db') | |
c = conn.cursor() |
This file contains 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 requests,json | |
from pprint import pprint | |
movieId = 'tt0050083' | |
BASE_URL = 'http://www.omdbapi.com/?' | |
url = (BASE_URL + 'i=' + movieId + '&plot=full&r=json') | |
r = requests.get(url) | |
data = r.json() | |
pprint(data) |
This file contains 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 requests | |
import json | |
import pprint | |
def bizSearch(query): | |
api_key = yp_api | |
url = 'https://api.locu.com/v1_0/venue/search/?api_key=' + api_key | |
locality = query.replace(' ', '%20') | |
searchUrl = url + '&locality=' + locality + '&term=pizza' | |
json_data = requests.get(searchUrl) |
This file contains 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
#!python3 | |
from bs4 import BeautifulSoup | |
import requests, json, pprint | |
r = requests.get('https://en.wikipedia.org/wiki/List_of_film_remakes_A-M') | |
soup = BeautifulSoup(r.content, 'html.parser') | |
table = soup.findAll('table') |