loop through each stored url
This commit is contained in:
		
							parent
							
								
									7f89feba83
								
							
						
					
					
						commit
						e7154b4975
					
				| @ -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: | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user