Skip to content

Instantly share code, notes, and snippets.

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()
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)
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)
#!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')