Answer the question
In order to leave comments, you need to log in
How to output json result to html?
<div class="col-md-4">
<div class="contest_list">
<h3>Список контестов</h3>
<div class="list">
<p>Codeforces Round #407 (Div. 1)</p>
<p><a href="">27.03.2017 20:35 UTC+6</a></p>
<p><a href="">ссылка</a></p>
<hr>
</div>
<div class="list">
<p>Тренировка №9 для начинающих программистов</p>
<p><a href="">01.04 Sat 15:15</a></p>
<p><a href="">ссылка</a></p>
<hr>
</div>
</div>
</div>
def getContestList():
now = datetime.datetime.now()
# 2017-04-10T00%3A00%3A00
# print now.isoformat()
url_params = urllib.urlencode({'start_gte': now.isoformat(), 'offset':'100' })
# print url_params
r = requests.get('...'+url_params)
response = r.json()
# print response
# for obj in response["objects"]:
# print obj["href"]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question