output generated: 1 code used to get Model name:2
enter code here
test_link = 'https://www.amd.com/en/products/cpu/amd-ryzen-9-3900xt'
r = requests.get(test_link, headers=headers)
soup = BeautifulSoup(r.content,'lxml')
whole_data = soup.find('div', class_='fieldset-wrapper')
specifications = []
specifications_value=[]
for variable1 in whole_data.find_all('div', class_='field__label'):
#print(variable1.text)
variable1 = variable1.text
specifications = list(variable1.split('\n'))
#print(specifications)
for variable2 in whole_data.find_all('div', class_='field__item'):
#print(variable2.text)
variable2 = variable2.text
specifications_value = list(variable2.split('\n'))
#print(specifications_value)
issue:i am getting the data, but in separate variables and for loops, how to map these two variable using key-value pairs? so that i can check conditions like: if the value is platform then only tale it's value(box processor)
i want to capture the data in such a way that if the 'key' is platform then only capture it's value(boxed processor). similarly for all other 14 tags.