(you're calling enumerate(group_urls) twice with the first call having no apparent side-effects even though its result doesn't get operated on.  I don't know how expensive it is but it seems like something that's worth removing.