loop through each stored url

This commit is contained in:
Trowbridge 2019-12-18 16:23:48 -05:00
parent 7f89feba83
commit e7154b4975

View File

@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
import psycopg2
import wget
import sys
con = None
@ -14,8 +15,9 @@ try:
cur = con.cursor()
cur.execute('SELECT code, url FROM scrape.raw')
version = cur.fetchone()[1]
print(version)
urls = cur.fetchall()
for row in urls:
print(row[0],row[1])
except psycopg2.DatabaseError as e: