Rewrite channel extraction with proper error handling and new extraction names. Extract subscriber_count correctly.
Don't just shove english strings into info['stats']. Actually give semantic names for the stats.
This commit is contained in:
@@ -116,8 +116,14 @@
|
||||
{% if current_tab == 'about' %}
|
||||
<div class="channel-info">
|
||||
<ul>
|
||||
{% for stat in stats %}
|
||||
<li>{{ stat }}</li>
|
||||
{% for (before_text, stat, after_text) in [
|
||||
('Joined ', date_joined, ''),
|
||||
('', view_count|commatize, ' views'),
|
||||
('', approx_subscriber_count, ' subscribers'),
|
||||
] %}
|
||||
{% if stat %}
|
||||
<li>{{ before_text + stat|string + after_text }}</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<hr>
|
||||
|
||||
Reference in New Issue
Block a user