- Timestamp:
- Nov 17, 2010, 5:10:49 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
misc/geluksnummers-donaldduck.py
r233 r235 13 13 username = sys.argv[1] 14 14 password = sys.argv[2] 15 clubpasnummer = sys.argv[3] 15 16 except: 16 print "Usage %s <username> <password> " % sys.argv[0]17 print "Usage %s <username> <password> <clubpasnummer>" % sys.argv[0] 17 18 sys.exit(1) 18 19 … … 34 35 sys.exit(1) 35 36 36 print '\n'.join(m.group(1).split('-')) 37 numbers = [n for n in re.split('\s*-\s*', m.group(1)) if n] 38 print "\n".join(numbers) 39 if any([clubpasnummer.endswith(x) for x in numbers]): 40 print "YES; een prijs!" 41 else: 42 print "NO; volgende week weer een kans" 37 43 # Invalid HTML, else use the 'proper parser' 38 44 # import lxml
Note:
See TracChangeset
for help on using the changeset viewer.