Several upgrades and fixes
This commit is contained in:
parent
c9e7d64ef0
commit
e655122eea
@ -1 +1 @@
|
|||||||
{"twitter": [{"username": "aantonop"}, {"username": "Trezor"}, {"username": "aitor13023985"}, {"username": "guaridadelzorro"}, {"username": "elonmusk"}, {"username": "bitcoin"}, {"username": "monero"}, {"username": "xmroutreach"}, {"username": "Locha_io"}, {"username": "randybrito"}, {"username": "btcven"}, {"username": "Snowden"}, {"username": "_prestwich"}, {"username": "TradeOnFire"}, {"username": "fluffypony"}, {"username": "browseyourlife"}], "youtube": [{"channelId": "UCjr2bPAyPV7t35MvcgT3W8Q"}, {"channelId": "UCJWCJCWOxBYSi5DhCieLOLQ"}, {"channelId": "UCW3iqZr2cQFYKdO9Kpa97Yw"}, {"channelId": "UCLXo7UDZvByw2ixzpQCufnA"}, {"channelId": "UCR9sFzaG9Ia_kXJhfxtFMBA"}, {"channelId": "UCbdSYaPD-lr1kW27UJuk8Pw"}, {"channelId": "UCa3DVlGH2_QhvwuWlPa6MDQ"}, {"channelId": "UComoqWnjQlH7JpvqfyGnWNA"}, {"channelId": "UCA58hhLv4pdgDjBW5oNSklA"}, {"channelId": "UCkHR9m-tscD3ojD7_viIfTA"}, {"channelId": "UCYO_jab_esuFRV4b17AJtAw"}, {"channelId": "UC9-y-6csu5WGm29I7JiwpnA"}, {"channelId": "UC2PA-AKmVpU6NKCGtZq_rKQ"}, {"channelId": "UC2Qc22WUjL_GbBDIPvmHWmQ"}, {"channelId": "UC3Hx81QYLoEQkm3vyl4N4eQ"}, {"channelId": "UCiwy9Lx6h1Oi-UYwYDbgBZA"}, {"channelId": "UCHW_zn-nX5nvMjEA6mtNZ1A"}, {"channelId": "UCy5znSnfMsDwaLlROnZ7Qbg"}, {"channelId": "UCJQQVLyM6wtPleV4wFBK06g"}, {"channelId": "UCyoAJbq6rqi9bgMB0uDQSFg"}, {"channelId": "UCsXVk37bltHxD1rDPwtNM8Q"}]}
|
{"twitter": [{"username": "aantonop"}, {"username": "Trezor"}, {"username": "aitor13023985"}, {"username": "guaridadelzorro"}, {"username": "elonmusk"}, {"username": "bitcoin"}, {"username": "monero"}, {"username": "xmroutreach"}, {"username": "Locha_io"}, {"username": "randybrito"}, {"username": "btcven"}, {"username": "Snowden"}, {"username": "_prestwich"}, {"username": "TradeOnFire"}, {"username": "fluffypony"}, {"username": "browseyourlife"}], "youtube": [{"channelId": "UCjr2bPAyPV7t35MvcgT3W8Q"}, {"channelId": "UCJWCJCWOxBYSi5DhCieLOLQ"}, {"channelId": "UCW3iqZr2cQFYKdO9Kpa97Yw"}, {"channelId": "UCLXo7UDZvByw2ixzpQCufnA"}, {"channelId": "UCR9sFzaG9Ia_kXJhfxtFMBA"}, {"channelId": "UCbdSYaPD-lr1kW27UJuk8Pw"}, {"channelId": "UCa3DVlGH2_QhvwuWlPa6MDQ"}, {"channelId": "UComoqWnjQlH7JpvqfyGnWNA"}, {"channelId": "UCA58hhLv4pdgDjBW5oNSklA"}, {"channelId": "UCkHR9m-tscD3ojD7_viIfTA"}, {"channelId": "UCYO_jab_esuFRV4b17AJtAw"}, {"channelId": "UC9-y-6csu5WGm29I7JiwpnA"}, {"channelId": "UC2PA-AKmVpU6NKCGtZq_rKQ"}, {"channelId": "UC2Qc22WUjL_GbBDIPvmHWmQ"}, {"channelId": "UC3Hx81QYLoEQkm3vyl4N4eQ"}, {"channelId": "UCiwy9Lx6h1Oi-UYwYDbgBZA"}, {"channelId": "UCHW_zn-nX5nvMjEA6mtNZ1A"}, {"channelId": "UCy5znSnfMsDwaLlROnZ7Qbg"}, {"channelId": "UCJQQVLyM6wtPleV4wFBK06g"}, {"channelId": "UCyoAJbq6rqi9bgMB0uDQSFg"}, {"channelId": "UCsXVk37bltHxD1rDPwtNM8Q"}, {"channelId": "UCUuaixRSZZfiGE8AHYKhwNg"}, {"channelId": "UCBa659QWEk1AI4Tg--mrJ2A"}, {"channelId": "UCvHS9-Q3Qh1HIhLUGYFTL1g"}, {"channelId": "UC6107grRI4m0o2-emgoDnAA"}, {"channelId": "UCzrWKkFIRS0kjZf7x24GdGg"}]}
|
@ -226,7 +226,7 @@ def ytsearch():
|
|||||||
|
|
||||||
for v in vids:
|
for v in vids:
|
||||||
videos.append({
|
videos.append({
|
||||||
'author':v['channel'],
|
'channelName':v['channel'],
|
||||||
'videoTitle':v['title'],
|
'videoTitle':v['title'],
|
||||||
'description':Markup(v['long_desc']),
|
'description':Markup(v['long_desc']),
|
||||||
'id':v['id'],
|
'id':v['id'],
|
||||||
@ -315,7 +315,7 @@ def stream():
|
|||||||
ydl = YoutubeDL()
|
ydl = YoutubeDL()
|
||||||
data = ydl.extract_info("{id}".format(id=id), download=False)
|
data = ydl.extract_info("{id}".format(id=id), download=False)
|
||||||
req = requests.get(data['formats'][-1]['url'], stream = True)
|
req = requests.get(data['formats'][-1]['url'], stream = True)
|
||||||
return Response(stream_with_context(req.iter_content(chunk_size=1024)), content_type = req.headers['content-type'])
|
return Response(req.iter_content(chunk_size=10*1024), content_type = req.headers['Content-Type'])
|
||||||
else:
|
else:
|
||||||
flash("Something went wrong loading the video... Try again.")
|
flash("Something went wrong loading the video... Try again.")
|
||||||
return redirect(url_for('youtube'))
|
return redirect(url_for('youtube'))
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
<link rel= "stylesheet" type= "text/css" href= "{{ url_for('static',filename='semantic/semantic.min.css') }}">
|
<link rel= "stylesheet" type= "text/css" href= "{{ url_for('static',filename='semantic/semantic.min.css') }}">
|
||||||
<link rel="stylesheet" type= "text/css" href="{{ url_for('static',filename='styles.css') }}">
|
<link rel="stylesheet" type= "text/css" href="{{ url_for('static',filename='styles.css') }}">
|
||||||
<link rel="stylesheet" type= "text/css" href="{{ url_for('static',filename='videojs.css') }}">
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="ui stackable menu">
|
<div class="ui stackable menu">
|
||||||
@ -48,8 +47,5 @@
|
|||||||
{% endwith %}
|
{% endwith %}
|
||||||
|
|
||||||
{% block content %}{% endblock %}
|
{% block content %}{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
<script src="{{ url_for('static',filename='videojs.js') }}"></script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,8 +1,15 @@
|
|||||||
|
<head>
|
||||||
|
<link rel="stylesheet" type= "text/css" href="{{ url_for('static',filename='videojs.css') }}">
|
||||||
|
</head>
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div style="margin-top: 2em;" class="ui one column centered grid">
|
<div style="margin-top: 2em;" class="ui one column centered grid">
|
||||||
<video class="video-js vjs-default-skin" controls data-setup='{ "playbackRates": [0.5, 1, 1.25,1.5, 2] }' width="720" height="420" data-setup="{}">
|
<video class="video-js vjs-default-skin"
|
||||||
|
data-setup='{ "playbackRates": [0.5, 1, 1.25,1.5, 2] }'
|
||||||
|
width="720" height="420"
|
||||||
|
controls
|
||||||
|
preload="auto">
|
||||||
|
|
||||||
<source src="/stream?v={{video.id}}" type="video/mp4">
|
<source src="/stream?v={{video.id}}" type="video/mp4">
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
@ -42,4 +49,5 @@
|
|||||||
{{video.description}}
|
{{video.description}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<script src="{{ url_for('static',filename='videojs.js') }}"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
Reference in New Issue
Block a user