I am trying to find the instance of “2.22 / 2.22 GiB” where the integers are variable.
size_re = re.compile(“[0-9]+.[0-9][0-9] / [0-9]+.[0-9][0-9] GiB”)
def download_size(output):
m = size_re.search(output)
if m:
sizegroup = m.group()
return int(sizegroup)