amazon-orders 3.2.2__tar.gz → 3.2.3__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.2 → amazon_orders-3.2.3}/CHANGELOG.md +6 -0
- {amazon_orders-3.2.2/amazon_orders.egg-info → amazon_orders-3.2.3}/PKG-INFO +2 -1
- {amazon_orders-3.2.2 → amazon_orders-3.2.3/amazon_orders.egg-info}/PKG-INFO +2 -1
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazon_orders.egg-info/requires.txt +1 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazonorders/__init__.py +1 -1
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazonorders/conf.py +1 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazonorders/entity/order.py +2 -2
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazonorders/session.py +1 -1
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/pyproject.toml +2 -1
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/tests/test_conf.py +3 -1
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/tests/test_transactions.py +1 -1
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/LICENSE +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/MANIFEST.in +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/README.md +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazon_orders.egg-info/SOURCES.txt +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazon_orders.egg-info/dependency_links.txt +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazon_orders.egg-info/entry_points.txt +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazon_orders.egg-info/top_level.txt +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazonorders/banner.txt +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazonorders/cli.py +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazonorders/constants.py +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazonorders/entity/__init__.py +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazonorders/entity/item.py +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazonorders/entity/parsable.py +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazonorders/entity/recipient.py +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazonorders/entity/seller.py +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazonorders/entity/shipment.py +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazonorders/entity/transaction.py +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazonorders/exception.py +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazonorders/forms.py +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazonorders/orders.py +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazonorders/selectors.py +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazonorders/transactions.py +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/amazonorders/util.py +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/setup.cfg +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/tests/test_cli.py +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/tests/test_orders.py +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/tests/test_session.py +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/tests/test_util.py +0 -0
- {amazon_orders-3.2.2 → amazon_orders-3.2.3}/tests/testcase.py +0 -0
|
@@ -6,6 +6,12 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased](https://github.com/alexdlaird/amazon-orders/compare/3.2.2...HEAD)
|
|
8
8
|
|
|
9
|
+
## [3.2.3](https://github.com/alexdlaird/amazon-orders/compare/3.2.1...3.2.2) - 2025-02-06
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- `bs4_parser` to the config file, which allows for overriding the parser used by BeautifulSoup, defaulting to the built-in `html.parser`.
|
|
14
|
+
|
|
9
15
|
## [3.2.2](https://github.com/alexdlaird/amazon-orders/compare/3.2.1...3.2.2) - 2025-01-28
|
|
10
16
|
|
|
11
17
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: amazon-orders
|
|
3
|
-
Version: 3.2.
|
|
3
|
+
Version: 3.2.3
|
|
4
4
|
Summary: A CLI and library for interacting with Amazon order history.
|
|
5
5
|
Maintainer-email: Alex Laird <contact@alexlaird.com>
|
|
6
6
|
License: MIT License
|
|
@@ -62,6 +62,7 @@ Requires-Dist: responses; extra == "dev"
|
|
|
62
62
|
Requires-Dist: flask; extra == "dev"
|
|
63
63
|
Requires-Dist: twilio; extra == "dev"
|
|
64
64
|
Requires-Dist: pyngrok; extra == "dev"
|
|
65
|
+
Requires-Dist: lxml; extra == "dev"
|
|
65
66
|
Provides-Extra: docs
|
|
66
67
|
Requires-Dist: Sphinx; extra == "docs"
|
|
67
68
|
Requires-Dist: sphinx-notfound-page; extra == "docs"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: amazon-orders
|
|
3
|
-
Version: 3.2.
|
|
3
|
+
Version: 3.2.3
|
|
4
4
|
Summary: A CLI and library for interacting with Amazon order history.
|
|
5
5
|
Maintainer-email: Alex Laird <contact@alexlaird.com>
|
|
6
6
|
License: MIT License
|
|
@@ -62,6 +62,7 @@ Requires-Dist: responses; extra == "dev"
|
|
|
62
62
|
Requires-Dist: flask; extra == "dev"
|
|
63
63
|
Requires-Dist: twilio; extra == "dev"
|
|
64
64
|
Requires-Dist: pyngrok; extra == "dev"
|
|
65
|
+
Requires-Dist: lxml; extra == "dev"
|
|
65
66
|
Provides-Extra: docs
|
|
66
67
|
Requires-Dist: Sphinx; extra == "docs"
|
|
67
68
|
Requires-Dist: sphinx-notfound-page; extra == "docs"
|
|
@@ -36,6 +36,7 @@ class AmazonOrdersConfig:
|
|
|
36
36
|
"order_class": "amazonorders.entity.order.Order",
|
|
37
37
|
"shipment_class": "amazonorders.entity.shipment.Shipment",
|
|
38
38
|
"item_class": "amazonorders.entity.item.Item",
|
|
39
|
+
"bs4_parser": "html.parser",
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
if os.path.exists(self.config_path):
|
|
@@ -146,7 +146,7 @@ class Order(Parsable):
|
|
|
146
146
|
data_popover = value.get("data-a-popover", {}) # type: ignore[arg-type, var-annotated]
|
|
147
147
|
inline_content = data_popover.get("inlineContent") # type: ignore[union-attr]
|
|
148
148
|
if inline_content:
|
|
149
|
-
value = BeautifulSoup(json.loads(inline_content),
|
|
149
|
+
value = BeautifulSoup(json.loads(inline_content), self.config.bs4_parser)
|
|
150
150
|
|
|
151
151
|
if not value:
|
|
152
152
|
# TODO: there are multiple shipToData tags, we should double check we're picking the right one
|
|
@@ -166,7 +166,7 @@ class Order(Parsable):
|
|
|
166
166
|
)
|
|
167
167
|
|
|
168
168
|
if parent_tag:
|
|
169
|
-
value = BeautifulSoup(str(parent_tag.contents[0]).strip(),
|
|
169
|
+
value = BeautifulSoup(str(parent_tag.contents[0]).strip(), self.config.bs4_parser)
|
|
170
170
|
|
|
171
171
|
if not value:
|
|
172
172
|
return None
|
|
@@ -141,7 +141,7 @@ class AmazonSession:
|
|
|
141
141
|
|
|
142
142
|
self.last_response = self.session.request(method, url, **kwargs)
|
|
143
143
|
self.last_response_parsed = BeautifulSoup(self.last_response.text,
|
|
144
|
-
|
|
144
|
+
self.config.bs4_parser)
|
|
145
145
|
|
|
146
146
|
cookies = dict_from_cookiejar(self.session.cookies)
|
|
147
147
|
if os.path.exists(self.config.cookie_jar_path):
|
|
@@ -41,6 +41,7 @@ class TestConf(TestCase):
|
|
|
41
41
|
self.assertEqual(10, config.max_auth_attempts)
|
|
42
42
|
self.assertEqual(self.test_output_dir, config.output_dir)
|
|
43
43
|
self.assertEqual(self.test_cookie_jar_path, config.cookie_jar_path)
|
|
44
|
+
self.assertEqual("html.parser", config.bs4_parser)
|
|
44
45
|
|
|
45
46
|
# GIVEN
|
|
46
47
|
config.save()
|
|
@@ -48,7 +49,8 @@ class TestConf(TestCase):
|
|
|
48
49
|
# THEN
|
|
49
50
|
self.assertTrue(os.path.exists(config_path))
|
|
50
51
|
with open(config.config_path, "r") as f:
|
|
51
|
-
self.assertEqual("""
|
|
52
|
+
self.assertEqual("""bs4_parser: html.parser
|
|
53
|
+
constants_class: amazonorders.constants.Constants
|
|
52
54
|
cookie_jar_path: {}
|
|
53
55
|
item_class: amazonorders.entity.item.Item
|
|
54
56
|
max_auth_attempts: 10
|
|
@@ -57,7 +57,7 @@ class TestOrders(UnitTestCase):
|
|
|
57
57
|
|
|
58
58
|
def test_parse_transaction_form_tag(self):
|
|
59
59
|
# GIVEN
|
|
60
|
-
parsed = BeautifulSoup(TEST_PARSE_TRANSACTION_FORM_TAG_HTML,
|
|
60
|
+
parsed = BeautifulSoup(TEST_PARSE_TRANSACTION_FORM_TAG_HTML, self.test_config.bs4_parser)
|
|
61
61
|
form_tag = parsed.select_one("form")
|
|
62
62
|
|
|
63
63
|
# WHEN
|
|
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
|