【问题标题】:How to convert a tweet to image [closed]如何将推文转换为图像 [关闭]
【发布时间】:2017-01-02 08:24:33
【问题描述】:

是否有任何特定的应用程序、网站或其他东西可以将推文转换为图像?我想在 Telegram、whatsapp 等其他应用程序中分享推文。 提前致谢

【问题讨论】:

  • 截图?

标签: image twitter converter tweets


【解决方案1】:

Google 有一个secret screenshot API

例如,您可以使用它来获取这样的推文的屏幕截图

https://www.googleapis.com/pagespeedonline/v1/runPagespeed?screenshot=true&strategy=mobile&url=https%3a%2f%2ftwitter.com%2fedent%2fstatus%2f661570680253755392

在 JSON 响应的底部,您会看到

"screenshot": {
     "data": "_9j_4AAQSkZJRgAB.....=",
     "height": 569,
     "mime_type": "image/jpeg",
     "width": 320
 }

您需要使用 URL and Filename safe alphabet 对其进行 Base64 解码。

这将为您提供推文的 JPG 屏幕截图。

【讨论】:

    【解决方案2】:

    您现在可以使用 Twitter 上的@aissistant 句柄获取推文的图像或屏幕截图。

    Retweet or reply to any tweet with the comment "@aissistant #image" to get an image. 
    Retweet or reply to any tweet with the comment "@aissistant #screenshot" to get a screenshot.
    Retweet any tweet containing images or videos with the comment "@aissistant #video" to get a video.
    

    对于其他选项,例如转换为模因和笑话,请查看句柄。

    全面披露:我是手柄背后的机器人的创造者。

    【讨论】:

      【解决方案3】:

      我创建了一个小型网络应用程序来将推文转换为图像。它将 Twitter 的嵌入 URL 与后端的 Puppeteer 连接起来并截取屏幕截图。您还可以更改一些参数,例如图像宽度、填充、主题并将图像下载为 png 文件。

      它是开源的,所以你可以看看代码。

      https://github.com/ozgrozer/tweet-image

      https://tweet-image.glitch.me/

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2023-03-04
        • 1970-01-01
        • 2010-12-24
        • 2012-12-10
        • 2023-03-25
        • 2021-12-15
        • 1970-01-01
        • 2015-05-05
        相关资源
        最近更新 更多