projects
/
pywienerlinien
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c177ebf
)
cleanup Parser
author
Florian Schweikert
<kelvan@logic.at>
Thu, 17 Mar 2011 01:57:43 +0000
(
02:57
+0100)
committer
Florian Schweikert
<kelvan@logic.at>
Thu, 17 Mar 2011 01:57:43 +0000
(
02:57
+0100)
parseHtml.py
patch
|
blob
|
history
diff --git
a/parseHtml.py
b/parseHtml.py
index
6f21e1a
..
498d41d
100644
(file)
--- a/
parseHtml.py
+++ b/
parseHtml.py
@@
-13,16
+13,14
@@
class ParserError(Exception):
return repr(self.value)
class Parser:
- _overview = None
- _details = None
STATE_ERROR = -1
- STATE_START = 0
- STATE_SEARCH = 1
- STATE_RESULT = 2
- _current_state = 0
+ STATE_START, STATE_SEARCH, STATE_RESULT = range(3)
def __init__(self, html):
self.soup = BeautifulSoup(html)
+ self._overview = None
+ self._details = None
+ self._current_state = 0
def __iter__(self):
for detail in self.details():