support send more than 9 photos or videos

This commit is contained in:
2021-01-08 23:26:15 +08:00
parent 27235727d3
commit ab69f0281d

View File

@@ -196,6 +196,9 @@ class main:
ind = 0
di['media'] = []
for i in content['imgList']:
if ind % 9 == 0 and ind != 0:
re = self._request('sendMediaGroup', 'post', json=di)
di['media'] = []
di2 = {'type': 'photo', 'media': i}
if ind == 0:
di2['caption'] = text.tostr()
@@ -203,6 +206,9 @@ class main:
di['media'].append(di2)
ind = ind + 1
for i in content['videoList']:
if ind % 9 == 0 and ind != 0:
re = self._request('sendMediaGroup', 'post', json=di)
di['media'] = []
di2 = {'type': 'video',
'media': i['src'], 'supports_streaming': True}
if 'poster' in i and i['poster'] is not None and i['poster'] != '':