fork download
  1. import re
  2. s = 'https://e...content-available-to-author-only...e.com/example/page/'
  3. print(re.sub(r'(https?|ftps?)://|/', lambda x: x.group(0) if x.group(1) else '%', s))
  4.  
Success #stdin #stdout 0.02s 27752KB
stdin
Standard input is empty
stdout
https://e...content-available-to-author-only...e.com%example%page%