Skip to content

Latest commit

 

History

History
714 lines (416 loc) · 26.3 KB

File metadata and controls

714 lines (416 loc) · 26.3 KB

Changelog

All notable changes to this project will be documented in this file.

This project adheres to Semantic Versioning.

4.2.1 - 2026-05-08

Changed

  • WAF solver API keys can now also be set via AmazonOrdersConfig (under the lowercased env var name, e.g. capsolver_api_key), matching the precedence pattern used for other credentials.

Changed

  • WAF solver API keys can now also be set via AmazonOrdersConfig (under the lowercased env var name, e.g. capsolver_api_key), matching the precedence pattern used for other credentials.

4.2.0 - 2026-05-08

Added

  • Support for AWS WAF solving via third-party providers like CapSolver (pip install amazon-orders[capsolver]), Anti-Captcha (pip install amazon-orders[anticaptcha]), and 2Captcha (pip install amazon-orders[2captcha]). See the docs for setup.
  • auth_forms_classes config option for plugging custom AuthForm subclasses into the auth chain without code changes.
  • AmazonSession.default_auth_forms() static helper that returns the default form chain so callers can more easily extend it.
  • Configurable Amazon domain for non-.com sites via the domain parameter on AmazonSession, the domain config field, and the --domain CLI flag.
  • Improved currency parsing for English non-.com Amazon sites.

Added

  • Support for AWS WAF solving via third-party providers like CapSolver (pip install amazon-orders[capsolver]), Anti-Captcha (pip install amazon-orders[anticaptcha]), and 2Captcha (pip install amazon-orders[2captcha]). See the docs for setup.
  • auth_forms_classes config option for plugging custom AuthForm subclasses into the auth chain without code changes.
  • AmazonSession.default_auth_forms() static helper that returns the default form chain so callers can more easily extend it.
  • Configurable Amazon domain for non-.com sites via the domain parameter on AmazonSession, the domain config field, and the --domain CLI flag.
  • Improved currency parsing for English non-.com Amazon sites.

4.1.0 - 2026-05-03

Added

  • Python 3.13 support.

Changed

  • amazoncaptcha is now an optional dependency. Install with pip install amazon-orders[captcha] to enable Captcha auto-solve (only compatible with Python <=3.12. When not installed, Captcha challenges fall back to manual entry.

Deprecated

  • Captcha auto-solve via amazoncaptcha is likely to be removed in the future, since Amazon has continued to phase out OCR-style Captchas in favor of WAF.

Added

  • Python 3.13 support.

Changed

  • amazoncaptcha is now an optional dependency. Install with pip install amazon-orders[captcha] to enable Captcha auto-solve (only compatible with Python <=3.12. When not installed, Captcha challenges fall back to manual entry.

Deprecated

  • Captcha auto-solve via amazoncaptcha is likely to be removed in the future, since Amazon has continued to phase out OCR-style Captchas in favor of WAF.

4.0.19 - 2026-04-29

Added

  • Build and stability improvements.

Added

  • Build and stability improvements.

4.0.18 - 2025-12-06

Added

  • Order history can now be fetched by last30 or months-3 in addition to year-based filtering. Args added to CLI for this functionality are --last-30-days and --last-3-months.

4.0.17 - 2025-11-23

Added

  • warn_on_missing_required_field to the config file, set to True to log a warning message instead of raising an exception when a required fields are missing.

4.0.16 - 2025-09-09

Added

  • Stability improvements to auth flow.

4.0.15 - 2025-09-08

Added

  • Stability improvements to auth flow.

4.0.14 - 2025-08-24

Added

  • Support for Amazon's new claim for in the auth flow.
  • Stability improvements to auth flow.

Fixed

  • Issue printing cancelled orders in CLI.

4.0.13 - 2025-07-28

Fixed

  • Parsing cancelled orders in history.
  • Selector stability for parsing order ID and date.

4.0.12 - 2025-07-24

Added

  • Documentation improvements.

4.0.11 - 2025-07-14

Added

  • Support for automating Amazon's new Captcha solution that is pre-populated in the form field.

Removed

  • Support for Python 3.8.

4.0.10 - 2025-07-12

Added

  • Order.multibuy_discount, Order.amazon_discount, Order.gift_card, and Order.gift_wrap fields, which are now parsed alongside other subtotals.

4.0.9 - 2025-07-09

Added

  • Support for parsing shipping data from new data-component tag.
  • Order.reward_points field, which is now parsed alongside other subtotals.

Fixed

  • Edge case where Order.subscription_discount was not populated.

4.0.8 - 2025-06-27

Fixed

  • Edge case where, when start_index exceeds number of orders for the account, an exception was thrown. Now returns an empty list.

4.0.7 - 2025-05-27

Added

  • Stability improvements.
  • Documentation improvements.

Fixed

  • Edge cases where, when zero orders and/or zero transactions existed in the account, an exception was thrown. Now returns an empty list.

4.0.6 - 2025-05-12

Added

  • Stability improvements for auth flow.

4.0.5 - 2025-05-01

Added

4.0.4 - 2025-04-30

Added

  • Stability improvements and increased test coverage.
  • Documentation improvements.

4.0.3 - 2025-04-29

Added

  • Stability improvements for auth flow.
  • Documentation improvements.

4.0.2 - 2025-04-25

Added

  • Improvements around auth retry logic.
  • Detect JavaScript-based auth challenges (which can be solved) and give more clear error for them.
  • Stability improvements.
  • Documentation improvements.

Added

  • Stability improvements for auth flow.
  • Documentation improvements.

4.0.1 - 2025-04-22

Added

  • Stability improvements around cookies, authentication, and logout.

4.0.0 - 2025-04-21

Added

  • Improvements to error handling and logging when persisted session expires.
  • Stability improvements.

Changed

  • AmazonOrders.get_order_history() now fetches each individual order using asyncio for 5-10x performance improvements.
  • AmazonOrders.request now takes persist_cookies, which defaults to False. Cookies are now only persisted when the login form is submitted, rather than with every request.
  • AmazonSession is now thread-safe.
  • Support for Amazon's new login auth flow.
  • Renamed constants.Constants.TRANSACTION_HISTORY_LANDING_ROUTE to constants.Constants.TRANSACTION_HISTORY_ROUTE.
  • Renamed constants.Constants.TRANSACTION_HISTORY_LANDING_URL to constants.Constants.TRANSACTION_HISTORY_URL.
  • Testing environment variables are now consistently prefixed with AMAZON_.

Removed

  • AmazonSession.last_response and AmazonSession.last_response_parsed. These variables forced AmazonSession in to a statefulness that means its underlying functionality cannot be made async. Use the response object AmazonSessionResponse instead.
  • constants.Constants.ORDER_HISTORY_LANDING_URL.
  • Evaluation of OTP_SECRET_KEY, use AMAZON_OTP_SECRET_KEY.
  • Removed SIGN_IN_REDIRECT_URL, as it is no longer needed with the new auth flow.

3.2.19 - 2025-04-21

Added

  • AmazonSession.otp_secret_key field.
  • Values for username, password, and otp_secret_key stored in AmazonOrdersConfig will now be used in precedence chain.
  • Stability improvements to authentication flows.

Changed

  • OTP_SECRET_KEY is replaced with AMAZON_OTP_SECRET_KEY. Evaluation of OTP_SECRET_KEY will be removed in the next major release.

3.2.18 - 2025-04-16

Added

  • Documentation improvements.

Changed

  • Paging is more clear now, based on the value of keep_paging (--single-page from the CLI) rather than evaluating start_index.

3.2.17 - 2025-04-15

Added

  • Authentication will now use environment variables AMAZON_USERNAME and AMAZON_PASSWORD, if present.
  • OTP can now be auto-solved if environment variable OTP_SECRET_KEY is populated with a time-based secret key.
  • Documentation improvements.

3.2.16 - 2025-04-09

Added

  • Order.index field.
  • Fixes for parsing issues from orders made at physical Amazon Store.

3.2.15 - 2025-03-09

Fixed

  • Issue where AmazonOrdersConfig could not be pickled.

3.2.14 - 2025-03-08

Added

  • Order.free_shipping field.

Fixed

  • Duplicate currency symbol in CLI output for Order details.

3.2.13 - 2025-03-02

Fixed

  • Broken parsing when Transaction.order_number is not selected from <a> tag.
  • Parsing issue with Transaction.seller in pending Transactions.

3.2.12 - 2025-02-24

Fixed

  • Order.coupon_savings and Order.promotion_applied may have multiple values, sum if so.

3.2.11 - 2025-02-23

Added

  • Order.coupon_savings field, which is now parsed alongside other subtotals.

3.2.10 - 2025-02-21

Fixed

  • When full_details=True is set and an Order's details page can't be parsed, the partial Order will still be returned (along with a warning that it's not fully populated).
  • Broken parsing when Amazon renders a completely empty Transaction div.

3.2.9 - 2025-02-19

Added

  • Further support for Amazon's new data-component tag on order ID and order date.

3.2.8 - 2025-02-18

Added

  • Dependency and documentation improvements (including fixing links to BeautifulSoup entities).

3.2.7 - 2025-02-17

Added

  • Fixes for parsing Amazon Fresh and Whole Foods Market orders, so they no longer need to be skipped (but their Items and Shipments will still be empty).

3.2.6 - 2025-02-17

Added

  • Add generic integration tests for Transactions, now in weekly run.
  • Other test improvements.

Fixed

  • Broken parsing when Transaction is pending.

3.2.5 - 2025-02-12

Fixed

  • Parsing errors on gift cards totals and broken item links due to changes in Amazon.com DOM.

3.2.4 - 2025-02-11

Added

  • Order.promotion_applied field, which is now parsed alongside other subtotals.

Fixed

  • Broken parsing of Whole Foods Market orders, these are now skipped.
  • Parsing issue on Order.order_number and Order.order_placed due to changes in Amazon.com DOM.

3.2.3 - 2025-02-06

Added

  • bs4_parser to the config file, which allows for overriding the parser used by BeautifulSoup, defaulting to the built-in html.parser.

3.2.2 - 2025-01-28

Added

  • Stability improvements.

Fixed

  • Broken parsing of Amazon Fresh orders, these are now skipped.

3.2.1 - 2024-11-08

Fixed

  • Issues with parsing Items and Shipments using the new data-component, selectors made more precise.
  • Transactions use util selector methods, so consistent use of trying a list of selectors is maintained.

3.2.0 - 2024-11-07

Added

  • Support for Transactions.
  • Improvements for currency parsing.

Changed

3.1.0 - 2024-11-04

Added

  • python-dateutil as a dependency is now used to parse dates, increasing the types of dates supported and eliminating manually splittings strings apart to find the date.
  • parse_date to simple_parse.
  • Cleanup for parsing payment method.
  • Cleanup for parsing currency totals.
  • Stability improvements.

Changed

  • Replaced simple_parse's link arg with a more generic attr_name (pass "href" or "src" as the value for the same behavior).
  • Order.payment_method_last_4 parses to an int, and now uses safe_simple_parse.

3.0.0 - 2024-11-03

Added

  • Retry support to CLI when stale session fails to authenticate the first time.
  • Improvements to exception messages on auth failures.
  • Documentation improvements.

Fixed

  • Several parsing issues with the implementation of Amazon's new data-component tag.

Removed

  • Order.order_shipped_date, this cannot be consistently parsed from Amazon.
  • Order.refund_completed_date, this cannot be consistently parsed from Amazon.

2.0.3 - 2024-11-01

Added

  • Further support for Amazon's new data-component tag on order price, seller, and return eligibility, and fixing an issue with Shipment parsing.
  • Parsable.to_date() attempts multiple date formats.

Fixed

  • An issue with Shipments parsing with Amazon's new data-component.

2.0.2 - 2024-10-30

Added

  • item_class to the config file, which allows for overriding the Item class.
  • Support for Amazon's new data-component tag on order subtotals.
  • Build and stability improvements.

Fixed

  • The return value of Order._parse_recipient() is now optional, so parsing doesn't break digital goods without a shipping address.
  • Redundant order ID logic to parse from the URI, simplified to consistently fetch from page.
  • Support for order details selector on Amazon's legacy digital orders page.

2.0.1 - 2024-10-27

Added

Build and stability improvements.

2.0.0 - 2024-10-26

Added

  • Support for Amazon's new data-component tags.
  • order_class to the config file, which allows for overriding the Order class.
  • shipment_class to the config file, which allows for overriding the Shipment class.
  • Simplified integration tests to more quickly catch regressions.
  • Bug fixes and stability improvements.

Changed

Removed

1.1.4 - 2024-06-07

Added

  • Improvements to helper functions for simple parsing support (prefix_split, parsing improvements, and more).
  • Bug fixes and stability improvements.

1.1.3 - 2024-06-05

Added

  • Config is now managed through a YAML file, with support for CLI overrides.
  • Documentation improvements.

Fixed

  • Parsing issues due to change in Amazon.com DOM.
  • Other minor bug fixes.

1.1.2 - 2024-05-18

Added

  • Build improvements.
  • Documentation improvements.
  • Test improvements (Amazon no longer provides the condition field in many cases).

Fixed

  • Raise AmazonOrdersNotFoundError when Order is not found.
  • Prices with thousands separator now parse properly.

Changed

1.1.1 - 2024-04-09

Added

  • Build improvements.
  • Test improvements.

Changed

  • Renamed kwarg passed to IODefault.prompt() from captcha_img_url to img_url.
  • Renamed kwarg passed to IODefault.prompt() from mfa_device_select_choices to choices.

1.0.16 - 2024-03-24

Added

  • constants.BASE_URL will look for the environment variable AMAZON_BASE_URL before defaulting to "https://www.amazon.com".
  • Build and stability improvements.

1.0.15 - 2024-03-05

Added

  • Build and style improvements.
  • Documentation improvements.
  • pytest to streamline running unit and integration tests.

Removed

  • conf.VERSION, moved all version information to amazonorders/__init__.py. Get package version with from amazonorders import __version__ instead.

1.0.14 - 2024-02-26

Added

  • Build improvements.

Changed

  • Renamed make check-style to make check.

1.0.13 - 2024-02-20

Added

  • login command to CLI.
  • If --username or --password are not given and no stored session, CLI will prompt.
  • Build improvements.

Fixed

  • Issue where Parsable objects could not be pickled due to BeautifulSoup Tag objects.

1.0.12 - 2024-02-11

Added

  • Relative dependency pinning in pyproject.toml.
  • Style and stability improvements (check flake8 with make check-style).

Removed

  • requirements.txt files to streamline in to pyproject.toml.

1.0.11 - 2024-02-09

Changed

  • version command now includes Python version and doesn't printer banner, for easy parsing.

1.0.10 - 2024-02-08

Added

  • Migrated to pyproject.toml.

1.0.9 - 2024-02-07

Added

  • AuthForm's now passes captcha_img_url to its prompt() fallback for Captcha, useful for overriding IODefault.
  • MfaDeviceSelectForm now passes mfa_device_select_choices to prompt(), useful for overrides IODefault.
  • Documentation improvements.

1.0.8 - 2024-01-30

Added

  • Stability improvements.

1.0.7 - 2024-01-29

Added

  • AuthForm abstract class, and migrated all auth flow items to subclasses of this class.
  • Parsable.simple_parse(), which can handle most basic fields when parsed with CSS selectors.
  • Stability improvements.
  • Test improvements.

Changed

  • Moved all constant variables (URLs, CSS selectors, etc.) to constants.py.
  • Migrated entities to use CSS selector constants.
  • constants.SIGN_IN_URL is now the landing page for login, the old value has been moved to constants.SIGN_IN_REDIRECT_URL.

1.0.6 - 2024-01-25

Added

  • Support for when local session data is stale (Amazon prompts us to login again).
  • Documentation improvements.

Fixed

  • Regression in the Captcha flow introduced in 1.0.5.

1.0.5 - 2024-01-25

Added

Changed

1.0.4 - 2024-01-24

Added

  • A new OTP auth flow from Amazon that can occur after Captcha.
  • Parameters --max-auth-attempts and --output-dir to CLI.
  • DEFAULT_OUTPUT_DIR, which defaults to os.getcwd(), but allows users to change where output files are written.
  • Troubleshooting section to the docs.
  • Test improvements, including the ability to run dynamic tests using private order data from JSON files.

Changed

  • Improved string representations of entities, including Order, moved string representation of all fields back to cli.py out of the __str__ method.
  • Moved DEFAULT_COOKIE_JAR_PATH to conf.py.

1.0.3 - 2024-01-18

Added

  • CLI improvements.
  • Documentation improvements.

1.0.2 - 2024-01-18

Added

  • IODefault for I/O operations, which can be extended to use something other than print() and input().
  • Documentation improvements.
  • Test improvements.

Removed

  • Orders.print_output variable, cli.py now handles output.

1.0.1 - 2024-01-17

Added

  • Auth flow now also checks session cookies in addition to parsing the page for signs of login.
  • All fields to string representation of Order, so they are not output on the CLI.
  • logout command to CLI.
  • Documentation improvements.
  • Test improvements.

Fixed

  • Improvements to CLI, including error message cleanup on auth exceptions.
  • Order.order_details_link is now properly populated even on the details page.
  • .gitattributes to HTML files are now ignore by Linguist.

1.0.0 - 2024-01-16

  • First stable release of amazon-orders.