Nov-09-2018, 05:47 PM
Hey, so I've looked around to try and identify why this apparent return value is causing a tuple out of range error, I've yet to come up with a solution. Here's my code:
Never mind, just figured it out by myself. I think what was happening was it was trying to have 2 index values be used in the format when there was actually only one. I removed id = and it works fine now.
embed.set_thumbnail(url = "https://img.youtube.com/vi/{0}/default.jpg".format(id = await youtubeurlsnipper(vplayer.url))) async def youtubeurlsnipper(x): url = x if len(url) > 43: url = url[32:43] else: url = url[32:] return url
Never mind, just figured it out by myself. I think what was happening was it was trying to have 2 index values be used in the format when there was actually only one. I removed id = and it works fine now.