Comments (5)
Can you provide html you are working with?
from html-telegraph-poster.
It is a bigger project, in which I'm parsing a Blog post, and it happened to contain a YT video.
from html_telegraph_poster import upload_to_telegraph
url2send = upload_to_telegraph(title=title, author='me', text=text)["url"]
variable text contains all the html (which I am modifying in order to be able to be able to upload to telegraph and to trim garbage :) )
I get a telegraph page with all images/text, but without video.
Hence I tried to hardcoding variable text just before the line
url2send = upload_to_telegraph(title=title, author='me', text=text)["url"]
like this
text = "<video><source src="VIDEOURL"></video>"
url2send = upload_to_telegraph(title=title, author='me', text=text)["url"]
or
text = "<embed src="VIDEOURL">"
url2send = upload_to_telegraph(title=title, author='me', text=text)["url"]
but I can't
Thanks in advance
from html-telegraph-poster.
- telegra.ph only supports youtube and vimeo iframe tags, so your html should contain for example:
<iframe width="560" height="315" src="https://www.youtube.com/embed/EOQj_Ql4WSY" frameborder="0" allowfullscreen></iframe>
This is what youtube offers for embedding
2. video tag is supported for gifs without the sound.
3. embed tag is unsupported.
4. You can read tests for iframe here https://github.com/mercuree/html-telegraph-poster/blob/master/tests/htp_test.py#L280
from html-telegraph-poster.
Thanks for the kind response, you're been awesome.
Just Successfully embedded the YT video as you said.
In this blog post there is also a facebook iframe video, but as you said I have no hope...
Thanks again
from html-telegraph-poster.
Instant view supports facebook videos
https://instantview.telegram.org/docs#embedded-elements
but you have to write instant view template
from html-telegraph-poster.
Related Issues (17)
- Html code doesn't work in author fields HOT 3
- Option to auto upload images HOT 6
- Proxy. HOT 2
- 'TelegraphPoster' object is not subscriptable HOT 1
- JSONDecodeError, Seems like Telegraph isn't returning a json response HOT 2
- Upload Image Not Working HOT 1
- Cannot get token HOT 1
- thanks man, wrapped around my head around other libraries here on github, trying to hack together something useful,....yours instead worked like a charm at first try! thanks
- Exception: Error while uploading the image HOT 7
- Allow <br> tags in text HOT 3
- Consider switching from lxml's clean_html for enhanced security (and possibly performance) HOT 2
- Personal link preview description HOT 1
- How to edit a previously created page? HOT 2
- Why doesn't the page I generated support instant view? HOT 6
- Article updated instead of posted HOT 2
- Replacing http to https
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from html-telegraph-poster.