Jun-14-2019, 01:30 AM
(Jun-14-2019, 12:32 AM)grootkarzijn Wrote: Probably are the methods the same.Then you could have tried
>> soup.find('type').text 'CALL_RECEIVED' >>> s = soup.find_all('device') >>> s[0].find_all('attributeValue') [<attributeValue>104</attributeValue>, <attributeValue>name1</attributeValue>, <attributeValue>INTERNAL_DEVICE_TYPE</attributeValue>] >>> [tag.text for tag in s[0].find_all('attributeValue')] ['104', 'name1', 'INTERNAL_DEVICE_TYPE'] >>> [tag.text for tag in s[1].find_all('attributeValue')] ['103', 'name2', '104', '2219', 'INTERNAL_DEVICE_TYPE']