Using wget
I downloaded this webpage:
With the command:
RobWebsiteAddress="https://www.walmart.ca/en/ip/Dispenser-Set-Tumbler-Organizer-Bathroom-Bin-Holder-Bathroom-Containers-Soap-Set-Accessories-Travel-6Pcs-Accessory-Ejoyous-Dish-Toothbrush/PRD4406MV3EZF75"
DownloadName="Ejoyous1"
wget -O- -q --user-agent=AGENT "$RobWebAddress" > "$DownloadName"
When I try to open the file in gedit
it goes crazy.
When I use:
grep -i 23.31 Ejoyous1 | wc
0 0 0
The price isn't found. If I grep
on the word price
I get one long line of 146,329 characters returned which is probably what drove gedit
crazy:
$ grep -i price Ejoyous1 | wc
1 6292 146329
Within the .5 MB file is some hints:
$ grep -i necolas Ejoyous1
/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
As you can tell this is from Walmart's website. I have no problem getting Costco's pricing and Ikea's pricing by simply downloading the webpage with wget
and grepping it. I also have no problem viewing the downloaded files from Costco or Ikea with gedit
.
How can I interpret this language if it's a derivative of HTML? What tools should I use? Any clues to get on the right path?
.html
option. The resulting save file could then be grepped for the price. So your idea last night seems like the path of least resistance so far. In essence Firefox is signing up to the Walmart Developer program and decodingjson
(or whatever the language is) for me.