-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.py
32 lines (24 loc) · 885 Bytes
/
example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/python3
## coding: latin-1
from checkbox_parser import html_parser
data = [
{
'id_question': 'first',
'question': 'What is the most important reason for choosing a gym?',
'answers': ['The price', 'That it has personalized attention', 'That it has the best facilities', 'That it has a very long schedule'],
'position': 1
},
{
'id_question': 'third',
'question': 'What pay period is the best for you to go to a gym?',
'answers': ['Annual', 'Bimonthly', 'Monthly'],
'position': 3
},
{
'id_question': 'second',
'question': 'What motivates you the most to join a gym?',
'answers': ['Physical appearance', 'Physical condition', 'Know another social circle'],
'position': 2}
]
parser = html_parser(data)
print(parser.get_html())