Hi, I have trouble with Telegram images scraper (I don't know how to call it). It's a feature that puts an image in chat via URL.
(Screenshot below).
But when I am trying to serv static files by Django or Flask Telegram really can't scrap that image.
(Screenshot below)
Also, I've tried NGINX server but seems similar.
Did anybody know how that feature works or somebody tried to do that
on their own? Maby I should register the domain?
Related
first time question.
I have been playing with Django and needed a photo gallery, and made a basic one, then found starcross gallery (https://github.com/Starcross/django-starcross-gallery). It works really nice and easy to put into my app, but from what I can tell its made for dragging and dropping images in, or by adding them from the django-admin page.
I need to be able to add photos from an external script. I haven't dealt with ImageField before. I was able to import the gallery.models in my api views file, and make it so I can POST and add those ok. But I have been pulling my hair out trying to get actual images to upload.
From looking around, I found I think how to do it with curl (I make my requests with curl then port it to python), and it gave me CSRF issues with a 403 Forbidden.
How can I upload an image and bind it to an album, externally with curl or Python?
Thanks
Is it possible to upload and manipulate a photo in the browser with GitHub-pages? The photo doesn't need to be stored else than just for that session.
PS. I'm new to this area and I am using python to manipulate the photo.
GitHub pages allows users to create static HTML sites. This means you have no control over the server which hosts the HTML files - it is essentially a file server.
Even if you did have full control over the server (e.g. if you hosted your own website), it would not be possible to allow the client to run Python code in the browser since the browser only interprets JavaScript.
Therefore the most easy solution is to re-write your code in JavaScript.
Failing this, you could offer a download link to your Python script, and have users trust you enough to run it on their computer.
I'm using the API given here from Google, https://developers.google.com/blogger/docs/3.0/using . It allows managing the Blogger blogs easily. The problem is that the content that this API accepts is an HTML content. So, I must provide it with.
title
Hello, how are you doing today
...
So, to integrate an image on the post I must upload it to another image uploader service then get the URL and add it to a tag.
In contrast, if I want to upload the image directly to the Blogger UI, the image will be uploaded to Google servers.
My question is: How can I upload images to google servers as the Blogger UI do, then integrate them into my posts?
I too have been trying to work around this issue. What I did in the end is to use Google Drive API to upload the image and then get a shareable URL and embed it in the blog post.
This comes with its drawbacks, the photos are slower to load on the blog and is not accessible to crawlers. But works as far as the requirement is concerned.
If you find any way to get it done through Blogger API or through Google Photos API, please do let me know.
I have begun developing a template for web development using the PWA and Polymer tutorial here: https://www.polymer-project.org/1.0/start/toolbox/set-up
I have gone through each step (1-4) and successfully deployed to appengine using python. When i serve the webpage on Localhost it renders all the polymerelements just fine, but once i deploy to appengine none of the elements get rendered.
Here are images of both.
Localhost:
Deployed to appengine:
Now I have double checked all the steps and i do not see anything i have missed. Any reason why this would not show up with any of the styling and elements? Once it is in appengine do I have to serve it like on localhost? All help is very appreciated, thanks in advance!
Let me know if you need any of the code as well. ALl of the code is exactly replicated from the tutorial link above.
EDIT: here are the errors im getting in my browser console:
Most of the errors are this one: this._desugarBehaviors is not a function
I was trying to make an image uploading script for Postimage.org.
I tried searching for an API but it seems that there is not any available. Can anyone help me how to make this script ? I don't have any idea how to make the uploading proccess? I think that something that i should do is open the image file in read binary mode ("rb").
Anyway i am waiting for your suggestions and ideas.
Firstly you should think about what happens when you press the upload button on the website. What your script could do is mimic this functionality, because essentially all it's triggering is a POST request to the web server with the specified information in the form and the image file data. You can initiate HTTP requests (e.g. GET, POST, etc.) using a library such as Requests (http://docs.python-requests.org/en/latest/index.html).
However, as this seems to have been discussed before, I will instead point you in the right direction: Send file using POST from a Python script