Created
July 16, 2014 22:09
-
-
Save akdh/214f1d54fd714b8f2368 to your computer and use it in GitHub Desktop.
Read from Sqlite3 DB
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 sqlite3 | |
url = “" | |
conn = sqlite.connect('fetch.db') | |
db = conn.curson() | |
db.execute("SELECT response FROM urls WHERE url = ?", (url,)) | |
response = db.fetchone()[0] | |
index = response.find('\n\n\n’) | |
body = response[index+3:] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment