2020-01-29 21:05:28 +00:00
|
|
|
{##}
|
|
|
|
<html>
|
|
|
|
<head>
|
2020-01-29 21:59:43 +00:00
|
|
|
<meta http-equiv="refresh" content="{{refresh}}">
|
|
|
|
<title>
|
|
|
|
{{listings[0].title}}
|
|
|
|
({{dateparse(listings[0].date).astimezone(tz).strftime("%H:%M")}})
|
|
|
|
</title>
|
2020-01-29 21:05:28 +00:00
|
|
|
<style>
|
|
|
|
main {
|
|
|
|
font-family: sans-serif;
|
|
|
|
max-width: 600px;
|
|
|
|
margin: 0 auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
h1 {
|
|
|
|
font-size: 1em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.listing {
|
|
|
|
display: flex;
|
|
|
|
padding: 8px;
|
|
|
|
border-bottom: 1px solid rgba(0, 0, 0, .12);
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
|
|
|
|
|
|
|
.listing:hover {
|
|
|
|
background-color: rgba(0, 0, 0, 0.1);
|
|
|
|
border-bottom: 1px solid rgba(0, 0, 0, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
.listing > div:first-child {
|
|
|
|
flex: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
a {
|
|
|
|
color: inherit;
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<main>
|
|
|
|
<form method="get">
|
2020-01-29 21:59:43 +00:00
|
|
|
URL: <input type="text" name="apiurl" value="{{apiurl}}" style="width: 530px" placeholder="https://www.marktplaats.nl/lrp/api/search?..."><br />
|
|
|
|
Refresh: <input type="text" name="refresh" value="{{refresh}}" style="width: 100px; text-align: right"> seconds (last update: {{now.strftime("%H:%M:%S")}}; next update: {{next.strftime("%H:%M:%S")}})<br />
|
2020-01-29 21:05:28 +00:00
|
|
|
<input type="submit" value="h">
|
|
|
|
</form>
|
|
|
|
|
|
|
|
{% for listing in listings %}
|
|
|
|
<a href="https://marktplaats.nl{{listing.vipUrl}}">
|
|
|
|
<div class="listing">
|
|
|
|
<div>
|
|
|
|
<h1>{{listing.title}}</h1>
|
|
|
|
<p>
|
|
|
|
€{{ "{:.2f}".format(listing.priceInfo.priceCents / 100) }}
|
|
|
|
{{listing.priceInfo.priceType}}
|
|
|
|
<br>
|
|
|
|
|
2020-01-29 21:59:43 +00:00
|
|
|
{{dateparse(listing.date).astimezone(tz).strftime("%Y-%m-%d %H:%M:%S")}}
|
2020-01-29 21:05:28 +00:00
|
|
|
<br>
|
|
|
|
|
|
|
|
{{listing.location.cityName}} ({{listing.location.distanceMeters // 1000}} km)
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{% for image in listing.imageUrls %}
|
|
|
|
<img src="{{ image }}" />
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
{% endfor %}
|
|
|
|
</main>
|
|
|
|
</body>
|
|
|
|
</html>
|