Trying to parse a simple page and get a file with a similiar table, but neither GoogleDocs, nor Excel, nor VS CSV Editor recognize image links as images. I've already tried to format links into <img src='URL'> and .jpg/.webp link, but it had no effect.
So how do I parse the images without saving them as files?
from bs4 import BeautifulSoup
import requests
import pandas
url = 'https://www.thecycledb.com/items'
header = ['LOGO','NAME','K-MARKS VALUE','VALUE PER WEIGHT','FACTION XP','XP PER POUND','WEIGHT']
soup = BeautifulSoup(requests.get(url).text,'lxml')
items = []
for item in soup.find_all('tr',class_='hover cursor-pointer group hover:active'):
item_name=item.find('th').text
list=[soup.find_all('img',alt=item_name)[1]['src']]
list.append(item_name)
for elemnt in item.find_all('td')[0:5]:
list.append(elemnt.text)
items.append(list)
table = pandas.DataFrame(items,columns=header)
columns_titles = ['LOGO','NAME','K-MARKS VALUE','VALUE PER WEIGHT','FACTION XP','XP PER POUND','WEIGHT']
table=table.reindex(columns=columns_titles) #swaps the LOGO and NAME columns because I want to
table.to_csv('C:/Users/Arnaud_Roy_is_a_great_compositor/Desktop/VsCodeCode/test.csv',encoding='utf8')
