标签: python python-3.x beautifulsoup discord.py
我正在尝试从imgur中获取随机图像,并让我的机器人说出来。这是我的代码:
page = urllib2.urlopen('http://imgur.com/random') soup = BeautifulSoup(page, 'lxml') src = [img['src'] for img in soup.find_all('img')] await ctx.send(src)
我得到的都是'[]'