# Как получить реальный URL загрузки поста?

**URL:** <https://meta.discourse.org/t/how-to-get-a-post-uploads-real-url/222144>\
**Category:** Support\
**Created:** [28.Март.2022 10:56:29 UTC](https://meta.discourse.org/t/how-to-get-a-post-uploads-real-url/222144 "2022-03-28T10:56:29Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![keff](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/keff/32/254412_2.png) [@keff](https://meta.discourse.org/u/keff)\
**Post date:** [28.Март.2022 12:25:46 UTC](https://meta.discourse.org/t/how-to-get-a-post-uploads-real-url/222144/4 "2022-03-28T12:25:46Z")

</div>

Привет @RGJ, только что попробовал пример кода на Python, упомянутый здесь: [Converting short upload URLs to full URLs - #2 by michaeld](https://meta.discourse.org/t/converting-short-upload-urls-to-full-urls/131760/2?u=keff)

Но, кажется, декодирование происходит неправильно.

Вот код, который я в итоге попробовал. Он должен декодироваться в “77f164006403e10d7d40143d525f8a5d69390baf”, но я получаю “77f13112951f458abf39d5e480c59eba10c97f31”. Есть какие-то идеи, почему это может быть? Я не очень опытен в подобных вещах.

```python
import base62
input = "h73zkifccxqjtevvuahwq9hefkt"
expected = "77f164006403e10d7d40143d525f8a5d69390baf"

decoded = hex(base62.decode(input, base62.CHARSET_INVERTED))[2:].zfill(40)

print('decoded: ' + decoded)

if expected != decoded:
  print('не декодировано правильно')
else:
  print('декодировано правильно')

```

---

_[View the full topic](https://meta.discourse.org/t/how-to-get-a-post-uploads-real-url/222144)._
