Scraping Amazon order history

Describe the problem.

I'm trying to scrape my amazon order history because Amazon won't let you download a CSV of orders older than ~2005 and I've got orders going back to 1998.

My problem seems straightforward: on your amazon order history page: https://www.amazon.com/gp/your-account/order-history/ref=ppx_od_dt_b_oh_link I'd like to click thru each year in the order "placed in" drop down. The drop down is generated on page load and is populated with a ul with some lis with a links that have an href target of javascript. I'd like to click on each year (the anchor links in the unordered list), then scrape the resulting order details, clicking on next page when needed.

It's the first part I'm unable to get working - I can't get webscraper to click on the order years. I can get the drop down to pop open, and can get a selector that gets the link data and targets for each year, but can't get it to follow the links. Right now my scraper opens the dropdown then does nothing.

Any help would be appreciated! Thanks!

Url: https://www.amazon.com/gp/your-account/order-history/ref=ppx_od_dt_b_oh_link

Sitemap:
{"_id":"amazon_order_history","startUrl":["https://www.amazon.com/gp/css/history/orders/view.html/ref=ordrep_oss_back"],"selectors":[{"id":"year links","type":"SelectorLink","parentSelectors":["_root"],"selector":"#a-popover-3 > div > div > ul > li > a","multiple":true,"delay":0},{"id":"click order details","type":"SelectorLink","parentSelectors":["year links"],"selector":"div.a-box-group:nth-of-type(n+5) div.shipment:nth-of-type(1) .a-button-stack > span:nth-of-type(1) a","multiple":true,"delay":0},{"id":"order date","type":"SelectorText","parentSelectors":["click order details"],"selector":"span.order-date-invoice-item:nth-of-type(1)","multiple":false,"regex":"","delay":0},{"id":"order address ","type":"SelectorText","parentSelectors":["click order details"],"selector":"div.od-shipping-address-container","multiple":false,"regex":"","delay":0},{"id":"item detail box","type":"SelectorElement","parentSelectors":["click order details"],"selector":"div.a-box .a-fixed-left-grid","multiple":true,"delay":0},{"id":"item title","type":"SelectorText","parentSelectors":["item detail box"],"selector":".a-fixed-left-grid-col > div.a-row:nth-of-type(1)","multiple":false,"regex":"","delay":0},{"id":"item link","type":"SelectorLink","parentSelectors":["item detail box"],"selector":".a-row a","multiple":false,"delay":0},{"id":"item creators","type":"SelectorText","parentSelectors":["item detail box"],"selector":"div.a-row:nth-of-type(2)","multiple":false,"regex":"","delay":0},{"id":"item seller","type":"SelectorText","parentSelectors":["item detail box"],"selector":"span.a-size-small.a-color-secondary","multiple":false,"regex":"","delay":0},{"id":"price","type":"SelectorText","parentSelectors":["item detail box"],"selector":"span.a-color-price","multiple":false,"regex":"","delay":0},{"id":"subtotals box","type":"SelectorElement","parentSelectors":["click order details"],"selector":"div#od-subtotals","multiple":false,"delay":0},{"id":"subtotals","type":"SelectorText","parentSelectors":["subtotals box"],"selector":"div.a-row","multiple":true,"regex":"","delay":0},{"id":"payment method","type":"SelectorText","parentSelectors":["click order details"],"selector":".a-section.a-spacing-base div.a-section","multiple":false,"regex":"","delay":0}]}

Here's a simple case of clicking on the button:

{"_id":"amazon_orders_just_date_picker","startUrl":["https://www.amazon.com/gp/your-account/order-history/ref=ppx_od_dt_b_oh_link"],"selectors":[{"id":"order_placed_in_button","type":"SelectorElementClick","parentSelectors":["_root"],"selector":"li:nth-of-type(n+3) a.a-dropdown-link","multiple":false,"delay":0,"clickElementSelector":"span.a-button-text.a-declarative","clickType":"clickOnce","discardInitialElements":"do-not-discard","clickElementUniquenessType":"uniqueText"}]}

But this doesn't click on the elements in the dropdown list. Any ideas?

Bump on this - any ideas? I mostly want to know how to do it because I feel dumb not knowing :slight_smile: