0

A lot of Telegram messages looks like this:

telegram message with attached photo

the json code for this type of message is:

    {
  "update_id": 414360120,
  "message": {
    "message_id": 23,
    "from": {
      "id": 219816716,
      "is_bot": false,
      "first_name": "Amir",
      "last_name": "S.A",
      "username": "Amir2966",
      "language_code": "fa"
    },
    "chat": {
      "id": 219816716,
      "first_name": "Amir",
      "last_name": "S.A",
      "username": "Amir2966",
      "type": "private"
    },
    "date": 1584933249,
    "forward_from": {
      "id": 200389711,
      "is_bot": true,
      "first_name": "اتچ بات",
      "username": "attachbot"
    },
    "forward_date": 1584932188,
    "text": "‍ ‍ Yahoo! is an American web services provider headquartered in Sunnyvale, California, and owned by Verizon Media.",
    "entities": [
      {
        "offset": 0,
        "length": 1,
        "type": "text_link",
        "url": "https://attach.fahares.com/jkDTNPgvAAzKpIL7jWj0MA=="
      }
    ]
  }
}

In this format, there is no photo & also file_id. How can I download the photos in telegram messages like this (with attached photo)?

  • what about "url": "https://attach.fahares.com/jkDTNPgvAAzKpIL7jWj0MA==" ? – xuesheng Mar 23 '20 at 09:28
  • I think this image comes from the social image tag in the website's HTML. Try checking the url for these tags. https://stackoverflow.com/q/19632323/2525319 – Cas Mar 23 '20 at 11:02

0 Answers0