[residentadvisor] add ticket status
This commit is contained in:
parent
4803b15721
commit
f1482dd218
1 changed files with 12 additions and 1 deletions
|
|
@ -18,7 +18,7 @@
|
||||||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
|
||||||
from weboob.capabilities.calendar import CATEGORIES, STATUS
|
from weboob.capabilities.calendar import CATEGORIES, STATUS, TICKET
|
||||||
from weboob.browser.elements import ItemElement, ListElement, method
|
from weboob.browser.elements import ItemElement, ListElement, method
|
||||||
from weboob.browser.filters.html import Attr, CleanHTML, Link
|
from weboob.browser.filters.html import Attr, CleanHTML, Link
|
||||||
from weboob.browser.filters.standard import CleanDecimal, CleanText, Date, CombineDate, DateTime, Regexp, Time, Type
|
from weboob.browser.filters.standard import CleanDecimal, CleanText, Date, CombineDate, DateTime, Regexp, Time, Type
|
||||||
|
|
@ -96,6 +96,17 @@ class EventPage(BasePage):
|
||||||
|
|
||||||
return end_date
|
return end_date
|
||||||
|
|
||||||
|
def obj_ticket(self):
|
||||||
|
li_class = Attr('//li[@id="tickets"]//li[1]', 'class', default=None)(self)
|
||||||
|
|
||||||
|
if li_class:
|
||||||
|
if li_class == 'closed':
|
||||||
|
return TICKET.CLOSED
|
||||||
|
else:
|
||||||
|
return TICKET.AVAILABLE
|
||||||
|
|
||||||
|
return TICKET.NOTAVAILABLE
|
||||||
|
|
||||||
|
|
||||||
class SearchPage(BasePage):
|
class SearchPage(BasePage):
|
||||||
@method
|
@method
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue