philipmulcahy / azad

amazon order history reporter chrome extension

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for Amazon.sa

waseem7 opened this issue · comments

To support Saudi Arabia Amazon site

www.amazon.sa

Hello @waseem7,

If I create a test build of this, will you test it and report back results? (I don't want to release it unless I know it works, or people will whinge).

Yours,

Philip

first pass is likely to work only on the english version of the site:

image

Hello, @philipmulcahy

I successfully tested this build on the amazon.ae domain, by adding "https://www.amazon.ae/*" to the content_scripts.matches[] in the manifest.json file, and everything works perfectly.

However, I encountered a minor issue: while processing 300 orders (thousands of items), Amazon started giving a 503 error. The solution was found by reducing the number of concurrent connections from 6 to 1, changing "this.CONCURRENCY = 1; //6". Also, I noticed that the parsing process unexpectedly stopped a couple of times without any errors or results, as if the process terminated on its own.

Either way, thanks for your work!

Oops - I never saw your post before today @shkgleb - I was just about to delete the development branch! Sorry

  1. thank you for looking!
  2. I think that the getting stuck might have been solved - can I send you another dev build? (As well as accidentally ignoring you, I was working on a new scheduling model, that provides better transparency in the logs as to what's gone wrong, and during this I found a few corner cases). I cannot make concurrency 1 the default or the users will come for me with pitchforks (it'd be too slow for the power users) - is it possible the SA site has lower rate limits?

Yours,

Philip

https://www.mulcahyfamily.org/azad/azad_7b1d4a30.zip - let me know how it works.
If it misbehaves out of the box (before you've hacked it down to no parallelism), then would you mind sharing a console log (with all log levels turned on)?

Thank you!

commented

philipmulcahy

Just tested this version on .ae ( by changing the url in the manifest file) like shkgleb mentioned before.

Looks like it's working fine, might need some extra testing on .SA version though.

Screenshot 2024-01-02 at 09 16 50

EDIT:

Downloading .csv / showing in plain table freezes the page if you click anywhere on it, but it does display the plain table / download the .csv after a while.

Console Output

2inject.bundle.js:187676 Found 170 orders for 2023
inject.bundle.js:189677 amazon_order_history_table.display starting
inject.bundle.js:189602 amazon_order_history_table.reallyDisplay starting
inject.bundle.js:187798 Adding progress indicator
inject.bundle.js:189555 adding table
inject.bundle.js:189557 added table
inject.bundle.js:189679 amazon_order_history_table.display then func returning table promise.
inject.bundle.js:189681 amazon_order_history_table.display returning
inject.bundle.js:189591 value_done_promises.length 4080
inject.bundle.js:189662 azad.reallyDisplay returning
inject.bundle.js:188381 RequestScheduler._checkDone() succeeded
31bJewCvY-L.js:19 
        
        
       POST https://fls-eu.amazon.ae/1/batch/1/OE/ net::ERR_BLOCKED_BY_CLIENT
send @ 31bJewCvY-L.js:19
x @ 31bJewCvY-L.js:7
z @ 31bJewCvY-L.js:7
setTimeout (async)
C @ 31bJewCvY-L.js:8
K @ 31bJewCvY-L.js:9
m @ orders?timeFilter=year-2023&ref_=ppx_yo2ov_dt_b_filter_all_y2023:10538
y @ orders?timeFilter=year-2023&ref_=ppx_yo2ov_dt_b_filter_all_y2023:10539
(anonymous) @ orders?timeFilter=year-2023&ref_=ppx_yo2ov_dt_b_filter_all_y2023:10539
/rd/uedata?at&v=0.273635.0&id=N6B8R9VZR57CSSPGY6KN&ctb=1&m=1&sc=N6B8R9VZR57CSSPGY6KN&cf=3838&af=3838&pc=30949&at=30950&t=1704172910147&csmtags=csm-feature-touch-enabled:false&pty=YourOrders&spty=OrdersDeBr&pti=undefined&tid=BF3FVHZ1W35S67FHEY5Q&aftb=1&lob=1:1 
        
        
       GET https://www.amazon.ae/rd/uedata?at&v=0.273635.0&id=N6B8R9VZR57CSSPGY6KN&ctb=1&m=1&sc=N6B8R9VZR57CSSPGY6KN&cf=3838&af=3838&pc=30949&at=30950&t=1704172910147&csmtags=csm-feature-touch-enabled:false&pty=YourOrders&spty=OrdersDeBr&pti=undefined&tid=BF3FVHZ1W35S67FHEY5Q&aftb=1&lob=1 net::ERR_BLOCKED_BY_CLIENT
Image (async)
m @ orders?timeFilter=year-2023&ref_=ppx_yo2ov_dt_b_filter_all_y2023:60
S @ orders?timeFilter=year-2023&ref_=ppx_yo2ov_dt_b_filter_all_y2023:65
(anonymous) @ orders?timeFilter=year-2023&ref_=ppx_yo2ov_dt_b_filter_all_y2023:10496
d @ orders?timeFilter=year-2023&ref_=ppx_yo2ov_dt_b_filter_all_y2023:10496
31bJewCvY-L.js:19 
        
        POST https://fls-eu.amazon.ae/1/batch/1/OE/ net::ERR_BLOCKED_BY_CLIENT
send @ 31bJewCvY-L.js:19
x @ 31bJewCvY-L.js:7
z @ 31bJewCvY-L.js:7
setTimeout (async)
C @ 31bJewCvY-L.js:8
K @ 31bJewCvY-L.js:9
a.count @ orders?timeFilter=year-2023&ref_=ppx_yo2ov_dt_b_filter_all_y2023:75
m @ orders?timeFilter=year-2023&ref_=ppx_yo2ov_dt_b_filter_all_y2023:60
S @ orders?timeFilter=year-2023&ref_=ppx_yo2ov_dt_b_filter_all_y2023:65
(anonymous) @ orders?timeFilter=year-2023&ref_=ppx_yo2ov_dt_b_filter_all_y2023:10496
d @ orders?timeFilter=year-2023&ref_=ppx_yo2ov_dt_b_filter_all_y2023:10496
inject.bundle.js:189677 amazon_order_history_table.display starting
inject.bundle.js:189602 amazon_order_history_table.reallyDisplay starting
inject.bundle.js:187798 Adding progress indicator
inject.bundle.js:189555 adding table
inject.bundle.js:189557 added table
inject.bundle.js:189679 amazon_order_history_table.display then func returning table promise.
inject.bundle.js:189681 amazon_order_history_table.display returning
inject.bundle.js:189591 value_done_promises.length 4080

those POST and GET errors are amazon javascript doing background stuff that get interleaved into the azad logging - they're annoying but irrelevant.

I will add .ae to the manifest and update the chrome store page to mention it - expect a release in about a week - thank you for testing!