add ua to db

This commit is contained in:
2024-06-13 22:25:09 +02:00
parent 4f8eec2335
commit 9417c9dfeb
3 changed files with 8 additions and 1 deletions
+2
View File
@@ -36,6 +36,7 @@ class Sender:
result = ReserveResultPojo(type=status, phone=contact.phone, message=status.value, url=url,
firstName=contact.first_name, lastName=contact.last_name, email=contact.mail,
passport=contact.passport, ccid=contact.ccid)
result.ua = contact.ua
if "oxylabs" in self.proxy_to_use["http"]:
if "mob" in self.proxy_to_use["http"]:
result.proxy = "oxylabs_mob"
@@ -93,6 +94,7 @@ class Sender:
# add to mongodb
self.logger.info(response.text)
self.logger.info("{}:{}".format(contact.mail, response.url))
contact.ua = js_data.ua
self.publish_message_to_queue(contact, status=PublishType.SUCCESS, url=response.url,
store_type=_selected_store)
cookies_to_set = response.headers['set-cookie']