There is a cycle that returns data, you need to take only the second value (8 digits). Tell me where to run, at least ...
- [5453]
- [12345678]
- []
- [124]
My code is:
for r in result: res = r.get_text() res = [int(''.join(i)) for is_digit, i in groupby(res,str.isdigit) if is_digit] print (res)