removed timeout from send_request and added promo options to product metadata
This commit is contained in:
1 parent
4b63a2d39c
commit
b876c3d7b3
3 files changed
+71
-3
No files matched your search
@@ -97,6 +97,16 @@ class ProductMetadata:
|
||||
overstock_text: Overstock label text when present.
|
||||
percentage: Computed discount percentage.
|
||||
affiliate_url: Affiliate link when available.
|
||||
promo_code: Event-level checkout code (e.g. "BIRTHDAY26") when the
|
||||
product's event advertises one, else None.
|
||||
promo_percentage: Advertised percent off from a percentage code
|
||||
("extra 22% off" -> 22); None for dollar codes or no code. This is
|
||||
the claimed discount, not the actual price delta.
|
||||
promo_dollar_off: Advertised dollar amount off from a spend-threshold
|
||||
code ("get an extra $22 off" -> 22); None for percentage codes or
|
||||
no code. Pairs with promo_min_spend.
|
||||
promo_min_spend: Spend threshold a dollar code requires ("Spend $100"
|
||||
-> 100); None unless promo_dollar_off is set.
|
||||
"""
|
||||
|
||||
image_url: str | None = None
|
||||
@@ -106,6 +116,10 @@ class ProductMetadata:
|
||||
overstock_text: str | None = None
|
||||
percentage: int | None = None
|
||||
affiliate_url: str | None = None
|
||||
promo_code: str | None = None
|
||||
promo_percentage: int | None = None
|
||||
promo_dollar_off: int | None = None
|
||||
promo_min_spend: int | None = None
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
@@ -11,7 +11,6 @@ import random
|
||||
from aioproxies import AioProxies
|
||||
from aioweb import Response
|
||||
from aioweb_tls import CurlCffi, TLSSession
|
||||
|
||||
from monitor_utils.constants import CLIENT_IDENTIFIERS, RETRY_LIMIT, TIMEOUT_SECONDS
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user