Skip to content

Instantly share code, notes, and snippets.

@aborruso
Last active June 6, 2019 22:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aborruso/2c28f0ee9b1633f4959251b73e4673de to your computer and use it in GitHub Desktop.
Save aborruso/2c28f0ee9b1633f4959251b73e4673de to your computer and use it in GitHub Desktop.
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
https://www.amazon.it/Voluker-x100mm-girevoli-Capacit%C3%A0-massima/dp/B07G55RQKK/ref=sr_1_6?__mk_it_IT=%C3%85M%C3%85%C5%BD%C3%95%C3%91&keywords=ruote&qid=1559829681&s=gateway&sr=8-6
https://www.amazon.it/66002445-Inserti-Mag-Bit-Portainserto-Acciaio/dp/B07B4PWP2F/ref=pd_sim_60_3/258-6152471-3872959?_encoding=UTF8&pd_rd_i=B07B4PWP2F&pd_rd_r=399f72be-8876-11e9-83c5-0fcfcd25517b&pd_rd_w=P18xR&pd_rd_wg=pFbJM&pf_rd_p=56b3c50e-3915-4b91-b522-56dd1dac87e6&pf_rd_r=9PYG5QKK515A8TZVA3F0&psc=1&refRID=9PYG5QKK515A8TZVA3F0
https://www.amazon.it/dp/B07QZQKRXY/ref=sspa_dk_detail_2?psc=1&pd_rd_i=B07QZQKRXY&pd_rd_w=4eX3m&pf_rd_p=03cd7042-0e1a-42a1-a4de-5be35e24f850&pd_rd_wg=pAfPk&pf_rd_r=37WHSMFYZ6MZE449EWCP&pd_rd_r=fd743642-887a-11e9-aa9f-fddc3ee4654b
#!/bin/bash
set -x
while read p; do
curl -sL "$p" -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)' --compressed |
scrape -be '//*[(@id = "title")] | //*[(@id = "priceblock_ourprice")]' |
xq -r '.html.body|[.h1.span["#text"],.span["#text"]]|@csv' >>03out.csv
done <01input.csv
Voluker 4 x100mm Ruote per mobili,Ruote girevoli,Ruote con freno,Capacità di carico massima 600KG,Grigio 28,49 €
LTI By Krino 66002445 - Set Inserti"Mag-Bit" Con Portainserto Magnetico, MyBit7-7 Pezzi 13,90 €
Schneespitze 7 Pezzi Cerniere di Centratura Autofilettanti Drill Bits Set Punte da Trapano Cerniere Strumento Perforatori,Trapano Autocentranti Chiave con Impugnatura Esagonale,7 Taglie 14,59 €
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment