Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
danozgriff committed Apr 13, 2016
1 parent bbea01d commit 4f30fc3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,15 @@ def ScrapeLivePrices():
if poscnt == 2:
price = float(tuple[1].replace(",", "").replace("p", ""))
if poscnt == 3:
print tidm
print tuple[1]
#print tidm
change = tuple[1]
#print change
#change = float(tuple[1].replace(",", "").replace("p", ""))
if poscnt == 4:
print tidm
print price
print change
print volume
scraperwiki.sqlite.save(["TIDM"], data={"TIDM":tidm+'.L', "Company":company, "Price":price, "Volume":tuple[1].replace(",", ""), "FTSE":ftse, "Date":datetime.date.today()}, table_name='company')
scraperwiki.sqlite.commit()
if len(tuple[1]) <= 4 and tuple[1][-1:].isalpha() and tuple[1][-1:].isupper() and tuple[1]!=tidm and poscnt!=1:
Expand Down

0 comments on commit 4f30fc3

Please sign in to comment.