parsed urllib parse urlparse settings WINNING_TRACKING_URL qs urllib p

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
parsed = urllib.parse.urlparse(settings.WINNING_TRACKING_URL)
qs = urllib.parse.parse_qs(parsed.query)
qs.update({
"auction_id": self.bidrequest.id,
"ssp": self.SSP,
"time": int(self.start_time)
})
qs_encoded = urllib.parse.urlencode(qs, doseq=True)
return f"{parsed.scheme}://{parsed.hostname}{parsed.path}?{qs_encoded}&auction_price=${'{AUCTION_PRICE}'}"