d=logos.loc[team,sport]['LINK'][0]

This commit is contained in:
Alexey Barabanov
2025-10-22 11:28:06 +03:00
parent 9ef232822d
commit c8b02fb39b

View File

@@ -172,8 +172,11 @@ def get_sport_logo(sport,pack,message):
def get_team_logo(team,sport,logos,message):
logger.info(f'Get {team}/{sport} logo')
bot.send_message(message.chat.id,f'Поиск логотипа {sport}-<b>{team}</b>',parse_mode=['html'])
logger.debug(team, sport)
logger.info(logos)
bot.send_message(message.chat.id, logos)
try:
d=logos.loc[team,sport]['LINK']
d=logos.loc[team,sport]['LINK'][0]##проверить!!!
logger.debug(d)
return d
except KeyError as inst:
@@ -285,8 +288,9 @@ def make_job_dicts(dd,pack,logos,message):
d=f"{dd['date'].day} {['','января','февраля','марта','апреля','мая','июня','июля','августа','сентября','октября','ноября','декабря'][dd['date'].month]}"
data['data']=d
# logger.debug(data)
# logger.debug(fn)
logger.debug(data)
logger.debug(data['outfile_name'])
logger.debug(fn)
logger.debug("End make name")
watch_list=[]
@@ -539,6 +543,7 @@ def unc2uri(unc):
from urllib.parse import urlparse
from pathlib import PureWindowsPath
try:
print(unc)
p= urlparse(unc)
if len(p.scheme)>2 or not unc:
return unc