fix reply markup forever

This commit is contained in:
Benny
2019-08-16 13:45:50 +08:00
parent 9f9edbb9e1
commit 1179c7524a
2 changed files with 3 additions and 2 deletions

3
bot.py
View File

@@ -75,8 +75,9 @@ def send_link(message):
# saved dict_r
bunch_upsert(dict_r)
markup = types.InlineKeyboardMarkup()
for i in range(0, len(list_r), 20):
logging.info("I'm sending you links now😉")
markup = types.InlineKeyboardMarkup()
part = list_r[i:i + 20]
for item in part:
btn = types.InlineKeyboardButton(item['name'], callback_data=item['id'])

View File

@@ -21,7 +21,7 @@ def get_html(kw: str) -> list:
logging.info('Requesting %s' % url)
r = s.get(url)
# status code is always 200
if '一共0条内容' not in r.text:
if 'data-cat' in r.text:
contents.append(r.text)
else:
break