Last active
August 29, 2015 14:07
-
-
Save SamuraiT/ab8bc073038b6161aca6 to your computer and use it in GitHub Desktop.
example_of_RedBlue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> from RedBlue import Event | |
>>> f = open('RedBlue/flask.html') | |
>>> events = Event(f) | |
>>> events #イベント情報が複数ある場合を考慮し,イベントインスタンスのリストを返す | |
[<Event:0>] | |
>>> e = events[0] | |
>>> e.place #開催場所 | |
'旭川市' | |
>>> e.date #開催日 | |
datetime.datetime(2013, 11, 10, 0, 0) | |
>>> e.duri #イベント開催期間 | |
[datetime.datetime(2013, 11, 10, 13, 0), datetime.datetime(2013, 11, 10, 17, 0)] | |
>>> e.time | |
'13:00' | |
>>> e.is_event() #イベントかどうか | |
True | |
>>> e.confidence() #イベントの確からしさ | |
87.5 | |
>>> e.postal_code #開催場所の郵便番号 | |
'0700033' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment