bfac icon indicating copy to clipboard operation
bfac copied to clipboard

changed url encode method (optimization)

Open itsrishub opened this issue 2 years ago • 0 comments

from this url = url.split('?')[0] url = url.replace('#', '%23') url = url.replace(' ', '%20')

to this import urllib.parse url = 'http://example.com/uploads/test.php' url = urllib.parse.quote(url)

it makes the code more optimised in terms of time, tested the optiminsation by time: 0.0009961128234863281 for my code 2.1457672119140625e-06 for previous code

itsrishub avatar Aug 25 '22 19:08 itsrishub