xiongzhu 2 jaren geleden
bovenliggende
commit
7586593094
1 gewijzigde bestanden met toevoegingen van 15 en 6 verwijderingen
  1. 15 6
      routes/api/index.js

+ 15 - 6
routes/api/index.js

@@ -81,14 +81,23 @@ module.exports = async function (fastify, opts) {
                                 price = await rows[1].innerText()
                             }
                             console.log(asin + ' start')
-                            let sif = await axios.get('https://www.sif.com/api/search/asinFlowOverview', {
-                                params: {
-                                    country: 'US',
+                            let sif = await axios.post(
+                                'https://www.sif.com/api/search/asinFlowOverview',
+                                {
                                     asin,
-                                    _t: new Date().getTime()
+                                    timePieceType: 'latelyDay',
+                                    timePieceValue: '7',
+                                    isListingSearch: false
                                 },
-                                timeout: 5000
-                            })
+                                {
+                                    params: {
+                                        country: 'US',
+                                        _t: new Date().getTime(),
+                                        _m: 'Sif_b589-1af2-44a3-b025-de62'
+                                    },
+                                    timeout: 5000
+                                }
+                            )
                             console.log(asin + ' end')
                             res.push({ text, href, price, asin, data: sif.data.data })
                             console.log(res.length + '/' + items.length)