amazon-orders 3.2.4__tar.gz → 3.2.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/CHANGELOG.md +7 -1
- {amazon_orders-3.2.4/amazon_orders.egg-info → amazon_orders-3.2.5}/PKG-INFO +1 -1
- {amazon_orders-3.2.4 → amazon_orders-3.2.5/amazon_orders.egg-info}/PKG-INFO +1 -1
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazonorders/__init__.py +1 -1
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazonorders/selectors.py +4 -2
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/tests/test_orders.py +35 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/LICENSE +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/MANIFEST.in +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/README.md +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazon_orders.egg-info/SOURCES.txt +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazon_orders.egg-info/dependency_links.txt +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazon_orders.egg-info/entry_points.txt +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazon_orders.egg-info/requires.txt +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazon_orders.egg-info/top_level.txt +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazonorders/banner.txt +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazonorders/cli.py +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazonorders/conf.py +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazonorders/constants.py +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazonorders/entity/__init__.py +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazonorders/entity/item.py +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazonorders/entity/order.py +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazonorders/entity/parsable.py +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazonorders/entity/recipient.py +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazonorders/entity/seller.py +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazonorders/entity/shipment.py +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazonorders/entity/transaction.py +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazonorders/exception.py +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazonorders/forms.py +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazonorders/orders.py +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazonorders/session.py +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazonorders/transactions.py +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/amazonorders/util.py +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/pyproject.toml +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/setup.cfg +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/tests/test_cli.py +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/tests/test_conf.py +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/tests/test_session.py +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/tests/test_transactions.py +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/tests/test_util.py +0 -0
- {amazon_orders-3.2.4 → amazon_orders-3.2.5}/tests/testcase.py +0 -0
|
@@ -4,7 +4,13 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
-
## [Unreleased](https://github.com/alexdlaird/amazon-orders/compare/3.2.
|
|
7
|
+
## [Unreleased](https://github.com/alexdlaird/amazon-orders/compare/3.2.5...HEAD)
|
|
8
|
+
|
|
9
|
+
## [3.2.5](https://github.com/alexdlaird/amazon-orders/compare/3.2.4...3.2.5) - 2025-02-12
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Parsing errors on gift cards totals and broken item links due to changes in Amazon.com DOM.
|
|
8
14
|
|
|
9
15
|
## [3.2.4](https://github.com/alexdlaird/amazon-orders/compare/3.2.3...3.2.4) - 2025-02-11
|
|
10
16
|
|
|
@@ -76,7 +76,8 @@ class Selectors:
|
|
|
76
76
|
".yohtmlc-item a", ".yohtmlc-product-title"]
|
|
77
77
|
FIELD_ITEM_LINK_SELECTOR = ["[data-component='itemTitle'] a",
|
|
78
78
|
".yohtmlc-item a",
|
|
79
|
-
"a:has(> .yohtmlc-product-title)"
|
|
79
|
+
"a:has(> .yohtmlc-product-title)",
|
|
80
|
+
".yohtmlc-product-title a"]
|
|
80
81
|
FIELD_ITEM_TAG_ITERATOR_SELECTOR = [".yohtmlc-item div"]
|
|
81
82
|
FIELD_ITEM_PRICE_SELECTOR = ["[data-component='unitPrice'] .a-text-price :not(.a-offscreen)",
|
|
82
83
|
".yohtmlc-item .a-color-price"]
|
|
@@ -93,7 +94,8 @@ class Selectors:
|
|
|
93
94
|
"bdi[dir='ltr']",
|
|
94
95
|
"span[dir='ltr']"]
|
|
95
96
|
FIELD_ORDER_GRAND_TOTAL_SELECTOR = ["div.yohtmlc-order-total span.value",
|
|
96
|
-
"div.order-header div.a-column.a-span2"
|
|
97
|
+
"div.order-header div.a-column.a-span2",
|
|
98
|
+
"div.order-header div.a-col-left .a-span9"]
|
|
97
99
|
FIELD_ORDER_PLACED_DATE_SELECTOR = ["[data-component='briefOrderInfo'] div.a-column",
|
|
98
100
|
"span.order-date-invoice-item",
|
|
99
101
|
"div.a-span3"]
|
|
@@ -3,6 +3,7 @@ __license__ = "MIT"
|
|
|
3
3
|
|
|
4
4
|
import os
|
|
5
5
|
import unittest
|
|
6
|
+
from datetime import date
|
|
6
7
|
|
|
7
8
|
import responses
|
|
8
9
|
|
|
@@ -77,6 +78,40 @@ class TestOrders(UnitTestCase):
|
|
|
77
78
|
self.assertEqual(1, resp1.call_count)
|
|
78
79
|
self.assertEqual(1, resp2.call_count)
|
|
79
80
|
|
|
81
|
+
@responses.activate
|
|
82
|
+
def test_get_order_history_2025_gift_card(self):
|
|
83
|
+
# GIVEN
|
|
84
|
+
self.amazon_session.is_authenticated = True
|
|
85
|
+
year = 2024
|
|
86
|
+
start_index = 0
|
|
87
|
+
resp1 = self.given_order_history_landing_exists()
|
|
88
|
+
with open(os.path.join(self.RESOURCES_DIR, "order-history-egift.html"), "r",
|
|
89
|
+
encoding="utf-8") as f:
|
|
90
|
+
resp2 = responses.add(
|
|
91
|
+
responses.GET,
|
|
92
|
+
self.test_config.constants.ORDER_HISTORY_URL,
|
|
93
|
+
body=f.read(),
|
|
94
|
+
status=200,
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
# WHEN
|
|
98
|
+
orders = self.amazon_orders.get_order_history(year=year, start_index=start_index)
|
|
99
|
+
|
|
100
|
+
# THEN
|
|
101
|
+
self.assertEqual(9, len(orders))
|
|
102
|
+
self.assertEqual(1, resp1.call_count)
|
|
103
|
+
self.assertEqual(1, resp2.call_count)
|
|
104
|
+
order = orders[5]
|
|
105
|
+
self.assertEqual("112-8022032-9113020", order.order_number)
|
|
106
|
+
self.assertEqual(150.00, order.grand_total)
|
|
107
|
+
self.assertIsNotNone(order.order_details_link)
|
|
108
|
+
self.assertEqual(date(2024, 10, 28), order.order_placed_date)
|
|
109
|
+
self.assertEqual(1, len(order.items))
|
|
110
|
+
self.assertEqual("Amazon eGift Card - Birthday Candles (Animated)",
|
|
111
|
+
order.items[0].title)
|
|
112
|
+
self.assertIsNotNone(order.items[0].link)
|
|
113
|
+
self.assertIsNotNone(order.items[0].image_link)
|
|
114
|
+
|
|
80
115
|
@responses.activate
|
|
81
116
|
def test_get_order_history_paginated(self):
|
|
82
117
|
# GIVEN
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|