WIP: Changing URL for embeds to user's URL
This commit is contained in:
parent
126a2af121
commit
685f642c45
@ -26,5 +26,5 @@
|
|||||||
<meta property="og:image" content="{{ pic }}" />
|
<meta property="og:image" content="{{ pic }}" />
|
||||||
|
|
||||||
<!--!-->
|
<!--!-->
|
||||||
<link rel="alternate" href="{{ url }}/oembed.json?desc={{ urlUser }}&user={{ urlDesc }}&link={{ urlLink }}" type="application/json+oembed" title="{{ user }}">
|
<link rel="alternate" href="{{ url }}/oembed.json?desc={{ urlUser }}&user={{ urlDesc }}&link={{ urlUserLink }}" type="application/json+oembed" title="{{ user }}">
|
||||||
<meta http-equiv="refresh" content="0; url = {{ tweetLink }}" /> {% endblock %} {% block body %} Redirecting you to the tweet in a moment. <a href="{{ tweetLink }}">Or click here.</a> {% endblock %}
|
<meta http-equiv="refresh" content="0; url = {{ tweetLink }}" /> {% endblock %} {% block body %} Redirecting you to the tweet in a moment. <a href="{{ tweetLink }}">Or click here.</a> {% endblock %}
|
@ -30,5 +30,5 @@
|
|||||||
|
|
||||||
<meta property="og:description" content="{{ desc }}" />
|
<meta property="og:description" content="{{ desc }}" />
|
||||||
|
|
||||||
<link rel="alternate" href="{{ url }}/oembed.json?desc={{ urlUser }}&user=Twitter&link={{ urlLink }}&ttype=link" type="application/json+oembed" title="{{ user }}">
|
<link rel="alternate" href="{{ url }}/oembed.json?desc={{ urlUser }}&user=Twitter&link={{ urlUserLink }}&ttype=link" type="application/json+oembed" title="{{ user }}">
|
||||||
<meta http-equiv="refresh" content="0; url = {{ tweetLink }}" /> {% endblock %} {% block body %} Redirecting you to the tweet in a moment. <a href="{{ tweetLink }}">Or click here.</a> {% endblock %}
|
<meta http-equiv="refresh" content="0; url = {{ tweetLink }}" /> {% endblock %} {% block body %} Redirecting you to the tweet in a moment. <a href="{{ tweetLink }}">Or click here.</a> {% endblock %}
|
@ -21,5 +21,5 @@
|
|||||||
<meta property="og:image" content="{{ pic }}" />
|
<meta property="og:image" content="{{ pic }}" />
|
||||||
<meta property="og:description" content="{{ desc }}" />
|
<meta property="og:description" content="{{ desc }}" />
|
||||||
|
|
||||||
<link rel="alternate" href="{{ url }}/oembed.json?desc={{ urlUser }}&user={{ urlDesc }}&link={{ urlLink }}&ttype=video" type="application/json+oembed" title="{{ user }}">
|
<link rel="alternate" href="{{ url }}/oembed.json?desc={{ urlUser }}&user={{ urlDesc }}&link={{ urlUserLink }}&ttype=video" type="application/json+oembed" title="{{ user }}">
|
||||||
<meta http-equiv="refresh" content="0; url = {{ tweetLink }}" /> {% endblock %} {% block body %} Redirecting you to the tweet in a moment. <a href="{{ tweetLink }}">Or click here.</a> {% endblock %}
|
<meta http-equiv="refresh" content="0; url = {{ tweetLink }}" /> {% endblock %} {% block body %} Redirecting you to the tweet in a moment. <a href="{{ tweetLink }}">Or click here.</a> {% endblock %}
|
@ -395,6 +395,7 @@ def getTemplate(template,vnf,desc,image,video_link,color,urlDesc,urlUser,urlLink
|
|||||||
time = vnf['time'],
|
time = vnf['time'],
|
||||||
screenName = vnf['screen_name'],
|
screenName = vnf['screen_name'],
|
||||||
vidlink = embedVNF['url'],
|
vidlink = embedVNF['url'],
|
||||||
|
userLink = f"https://twitter.com/{vnf['screen_name']}",
|
||||||
pfp = vnf['pfp'],
|
pfp = vnf['pfp'],
|
||||||
vidurl = embedVNF['url'],
|
vidurl = embedVNF['url'],
|
||||||
desc = desc,
|
desc = desc,
|
||||||
@ -408,6 +409,7 @@ def getTemplate(template,vnf,desc,image,video_link,color,urlDesc,urlUser,urlLink
|
|||||||
urlDesc = urlDesc,
|
urlDesc = urlDesc,
|
||||||
urlUser = urlUser,
|
urlUser = urlUser,
|
||||||
urlLink = urlLink,
|
urlLink = urlLink,
|
||||||
|
urlUserLink= urllib.parse.quote(f"https://twitter.com/{vnf['screen_name']}"),
|
||||||
tweetLink = vnf['tweet'],
|
tweetLink = vnf['tweet'],
|
||||||
videoSize = embedVNF['size'] )
|
videoSize = embedVNF['size'] )
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user