Skip to content

Instantly share code, notes, and snippets.

View jiko's full-sized avatar
👋
Hi!

James Koppen jiko

👋
Hi!
View GitHub Profile
@jiko
jiko / rapgenius_scraper.py
Created November 4, 2013 17:06
Scrapes Rap Genius for song lyrics. Leaves some mess to clean up in the output.
import requests # for grabbing pages
from bs4 import BeautifulSoup # for parsing pages
import codecs
# grab page
root = "http://rapgenius.com"
path = "/artists/2-chainz"
page = requests.get(root+path)
# load downloaded page into BS