I am using IMPORTXML to get information on USPS tracking numbers for my orders and I have been using it for about a month or so, it used to work on and off, sometimes it would not work and all I had to do was either refresh the page or add/remove the "S" on https, and it would work again but it has been about 5 days that it is not working at all no matter what I do, and it is a very tedious task to do manually, external 3rd party tracking apps won't work either because we need everyone to use just the sheet we have because not only contains the tracking info but also everything else. So is there any other way I can import some contents of the USPS tracking website that is reliable and won't stop working, I've seen some scripts here and there but haven't been able to apply them to my needs. Also if that script or workaround could work with other websites like UPS and Fedex it would be awesome as IMPORTXML doesn't work with them (it always says that the content is empty). Thanks in advance.
Asked
Active
Viewed 505 times
0
-
Does this answer your question? [Google Sheets importXML Returns Empty Value](https://stackoverflow.com/questions/61470783/google-sheets-importxml-returns-empty-value) – Rafa Guillermo Sep 28 '20 at 15:51
-
Thanks for the suggestion Rafa but that didn't help me, I saw that post and I understood why some websites receive the "Empty" content but the USPS one is not being generated by a script, it works when it works but it is not all the time. – GHoStyaiRo Sep 28 '20 at 16:03
-
Can you please post an example link? – Rafa Guillermo Sep 28 '20 at 16:05
-
This one `=IMPORTXML("httpS://tools.usps.com/go/TrackConfirmAction?qtc_tLabels19400108205497347138278", "//div[@class 'delivery_status']")` or This is another one I use to get other info from the same tracking. `=split(importxml("http://tools.usps.com/go/TrackConfirmAction?qtc_tLabels1==9405503699300020940156", "//span[@class== 'eta_wrap']")," ")` – GHoStyaiRo Sep 28 '20 at 18:26
-
both XPaths return nothing when I load the page in the browser – Matt Pi Sep 28 '20 at 18:29
-
What I did was go to the link `https://tools.usps.com/go/TrackConfirmAction?qtc_tLabels19400108205497347138278` and used the chrome inspector to find the div and span I needed. – GHoStyaiRo Sep 28 '20 at 18:32