messages.sendMedia, отправляющий медиа (в том числе и геолокацию), дополнительно передает аргумент reply_to_msg_id с id исходного сообщения, соответственно, поэтому ответ и приходит в качестве реплая на сообщений, из которого появилась данная клавиатура. В иосе же такого не происходит. *bold \*text*
_italic \*text_
__underline__
~strikethrough~
*bold _italic bold ~italic bold strikethrough~ __underline italic bold___ bold*
[inline URL](http://www.example.com/)
[inline mention of a user](tg://user?id=123456789)
`inline fixed-width code`
```
pre-formatted fixed-width code block
```
```python
pre-formatted fixed-width code block written in the Python programming language
``` messages.send, передав в него параметр attachment со значением в виде нужных аттачментов в формате <type><owner_id>_<media_id> через запятую.if event_chat.type == VkBotEventType.WALL_POST_NEW:
id_ = event_chat.object['id']
owner_id_ = event_chat.group_id
wall_post = f'wall-{owner_id_}_{id_}'
vk.method('messages.send', {'peer_id': id2, 'message': 'Новый пост в группе', 'attachment': wall_post})_ после owner_id можно не ставить config = configparser.ConfigParser()
config.read('config.ini')
public_key = config.get('Keys', 'public_key')
print(public_key)[Keys]
public_key = -----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyi/CekbwVp74kJeppZF8
19+nY1/69xY4TdcS/l4DKxsCKa31PjVymUXJwwsksuMfABZc1/ukJMEr4Yj93hAl
gGAYXAsVRyrrS/ZHhh3Juv4yY1UVT4TLn9vZJrKAG1ReAqU/plkRqjpu/7KGqCA8
LFK*********************WUH0+uPYIzqo/g8yzlBeZBmBAhwB
XTDWeyjrosX3FTIc3ORy6wEOLT0WX/oSqL1v4vXRfKCX/QHUdHZt8fXKvVamv+7l
KWoU4qdP4hxUVlasINhy8IxpQnlLwG7YGmAkkb/ih1NI+4W90kcAKU8z8lZg+gpx
3QIDAQAB
-----END PUBLIC KEY-----
" #Публичный RSA ключ def deleteResult(request, item_id):
if request.user.is_authenticated:
try:
item = Results.objects.get(item_id=item_id)
item.delete()
return HttpResponseRedirect("/results")
except Items.DoesNotExist:
return HttpResponseNotFound("<h2>Result not found</h2>")
return HttpResponseRedirect('/register')with open('json', 'r') as f:
data = json.load(f, parse_float=lambda num: str(num))Один хороший человек написал решение моей проблемы
from decimal import Decimal
with open('json', 'r') as f:
data = json.load(f, parse_float= lambda num: Decimal(num))vk.method('messages.getConversationMembers', {'peer_id': peer_id}) main('C:\\Directory\\Path\\test.txt', 'C:\\Directory2\\Path\\')main('C:/Directory/Path/test.txt', 'C:/Directory2/Path/')soup.select('.author') возвращает просто None, никакой ошибки в этом нет. Проверяйте содержимое soup.select('.author') на None.authors = soup.select('.author')
if authors:
for author in authors:
print(author.text)
else:
break answer_object = Answers.objects.get(pk=1)last_answer = Answers.objects.all().last()
if last_answer:
my_data = pd.read_csv(last_answer.url_csv) if after.channel:
await member.remove_roles(etaj1, etaj2, etaj3, ...)before.channel, то в нем не используется ни одна из 10 переменных, на создание которых ушло время.