chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.web-live.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reduce wait times to something more resembling a real pirate
[ypp-sc-tools.web-live.git]
/
yoweb-scrape
diff --git
a/yoweb-scrape
b/yoweb-scrape
index 31c75ae9f0a3ad774b1e2d3b5475f159933da6f8..3d9e857beaabe7d4622f3185cd6d4ff0c6c43350 100755
(executable)
--- a/
yoweb-scrape
+++ b/
yoweb-scrape
@@
-43,6
+43,7
@@
import re as regexp
import random
import curses
import termios
import random
import curses
import termios
+import random
from optparse import OptionParser
from StringIO import StringIO
from optparse import OptionParser
from StringIO import StringIO
@@
-142,7
+143,7
@@
class Fetcher:
min_age = 1
need_wait = 0
for age in ages:
min_age = 1
need_wait = 0
for age in ages:
- if age < min_age and age <
300
:
+ if age < min_age and age <
= 5
:
debug('Fetcher morewait min=%d age=%d' %
(min_age, age))
need_wait = max(need_wait, min_age - age)
debug('Fetcher morewait min=%d age=%d' %
(min_age, age))
need_wait = max(need_wait, min_age - age)
@@
-476,7
+477,7
@@
class PirateAboard:
return pa.pi
debug('PirateAboard refresh %d > %d %s' % (
age, guide, pa.name))
return pa.pi
debug('PirateAboard refresh %d > %d %s' % (
age, guide, pa.name))
- imaginary = [2,
6
]
+ imaginary = [2,
4
]
else:
imaginary = [1]
wait = fetcher.need_wait(now, imaginary)
else:
imaginary = [1]
wait = fetcher.need_wait(now, imaginary)