Skip to content

Commit

Permalink
Update scraper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
dgbhp committed Jun 1, 2016
1 parent 6b1932c commit 96912b3
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions scraper.py
Expand Up @@ -30,6 +30,7 @@
#alignment=0
#vesselflag=1
colcnt=0
recd=0
ColList = [0, 10.5, 1.26,1.14,1.12,1.12,1.08,1.13,1.1,1.09,1.08,1.07,1.04,1.05];

for tuple in tuples:
Expand Down Expand Up @@ -57,15 +58,17 @@
prevloc=loc
else:
print 'PrevLoc: ' + str(prevloc) + ' Loc: ' + str(loc) + ' Calc: ' + str(float(loc/prevloc)) + ' ListVal: ' + str(float(ColList[colcnt]))
if loc/prevloc >= ColList[colcnt]-.1 and loc/prevloc <= ColList[colcnt]+.1:
print 'AllOtherValidCols: ' + obj
lineout = lineout + obj + ','
colcnt=colcnt+1
prevloc=loc
elif loc/prevloc > ColList[colcnt]+.1:
lineout = lineout + ','
prevloc=prevloc*ColList[colcnt]
colcnt=colcnt+1
while recd==0:
if loc/prevloc >= ColList[colcnt]-.1 and loc/prevloc <= ColList[colcnt]+.1:
print 'AllOtherValidCols: ' + obj
lineout = lineout + obj + ','
colcnt=colcnt+1
prevloc=loc
recd=1
elif loc/prevloc > ColList[colcnt]+.1:
lineout = lineout + ','
prevloc=prevloc*ColList[colcnt]
colcnt=colcnt+1
#elif loc/prevloc < ColList[colcnt]-.1

if colcnt == 14:
Expand Down

0 comments on commit 96912b3

Please sign in to comment.