loop through each stored url
This commit is contained in:
parent
7f89feba83
commit
e7154b4975
@ -2,6 +2,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import psycopg2
|
import psycopg2
|
||||||
|
import wget
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
con = None
|
con = None
|
||||||
@ -14,8 +15,9 @@ try:
|
|||||||
cur = con.cursor()
|
cur = con.cursor()
|
||||||
cur.execute('SELECT code, url FROM scrape.raw')
|
cur.execute('SELECT code, url FROM scrape.raw')
|
||||||
|
|
||||||
version = cur.fetchone()[1]
|
urls = cur.fetchall()
|
||||||
print(version)
|
for row in urls:
|
||||||
|
print(row[0],row[1])
|
||||||
|
|
||||||
except psycopg2.DatabaseError as e:
|
except psycopg2.DatabaseError as e:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user