Directory structure:
dir1\image.jpg
dir1\image.png
dir2\image.jpg
dir2\image.png
image.jpg
image.png
| $ xidel -s \ | |
| --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:89.0) Gecko/20100101 Firefox/89.0" \ | |
| "https://www.idealista.it/vendita-case/fucecchio-firenze/lista-1.htm" \ | |
| -e . --output-node-format=html --output-node-indent > so_78601289.htm | |
| $ xidel -s so_78601289.htm -e ' | |
| //div[contains-token(@class,"item-info-container")]/div[@class="price-row"]/span[contains-token(@class,"item-price")]/text() | |
| ' | |
| 268.000 | |
| 350.000 |
| Turn the "Men's records"-table into "|"-separated values: | |
| $ xidel -s "https://en.wikipedia.org/wiki/List_of_Olympic_records_in_athletics" -e ' | |
| (//table)[1]/tbody/tr/join( | |
| (td|th) ! normalize-space( (: For every text-node remove the :) | |
| join(.//text() ! replace(.," ","")) (: no-break-spaces, string-join :) | |
| ), (: them together and remove :) | |
| " | " (: excessive white-space. :) | |
| ) | |
| ' |
| $ xidel -s "https://trac.ffmpeg.org/ticket/4859" -e '//dt/a[@class="trac-rawlink"]/@href' | |
| /raw-attachment/ticket/4859/MDR%20Exakt%2C%20die%20Story%20(20150617)%20-%20Das%20Kita-Versprechen--Anspruch%20und%20Wirklichkeit%20(720p%2C%20MDR).ttml | |
| /raw-attachment/ticket/4859/Vorstadtweiber%20(Folge%2006%2C%20S01E06%2C%209.%20Feb.%202015)%20-%20Schamlos%20(720p%2C%20SRF).ttml | |
| /raw-attachment/ticket/4859/narvestad_pC%25_tur_23_24-muhh59002316aw.ttml | |
| /raw-attachment/ticket/4859/Still%20Open%20All%20Hours.ttml | |
| $ xidel -s "https://trac.ffmpeg.org/ticket/4859" -e '//dt/a[@class="trac-rawlink"]/uri-decode(extract(@href,".+/(.+)",1))' | |
| MDR Exakt, die Story (20150617) - Das Kita-Versprechen--Anspruch und Wirklichkeit (720p, MDR).ttml | |
| Vorstadtweiber (Folge 06, S01E06, 9. Feb. 2015) - Schamlos (720p, SRF).ttml | |
| narvestad_pC%_tur_23_24-muhh59002316aw.ttml |
| $ xidel -se 'json-doc("Input1.json")(),json-doc("Input2.json")()' | |
| $ xidel -se ' | |
| json-doc("Input1.json")(), | |
| json-doc("Input2.json")() | |
| ' | |
| { | |
| "A": "Name 1", | |
| "B": "1.1", | |
| "C": "2" | |
| } |
| SET url=https://collegerama.tudelft.nl/Mediasite/Play/585a43626e544bdd97aeb71a0ec907a01d?catalog=fd32fd35-6c99-466c-89d4-cd3c431bc8a4 | |
| ------------------------------------------------------------------------------------------------ | |
| [JSON post data preparation] | |
| "QueryString" is not really necessary. | |
| xidel -se "('%url%',substring-before('%url%','?')) ! serialize({'getPlayerOptionsRequest':{'ResourceId':extract(.,'.+/([\da-z]+)',1),'QueryString':extract(.,'\?.+')}},{'method':'json'})" | |
| {"getPlayerOptionsRequest":{"ResourceId":"585a43626e544bdd97aeb71a0ec907a01d","QueryString":"?catalog=fd32fd35-6c99-466c-89d4-cd3c431bc8a4"}} |
Directory structure:
dir1\image.jpg
dir1\image.png
dir2\image.jpg
dir2\image.png
image.jpg
image.png
Let's say we have the following JSON...
{
"a": "b",
"c": [
{
"x": 1,
"y": 2,
"z": 3
}
| $ xidel -s "so_24300508.csv" -e '$raw' | |
| Africa,Kenya,NAI,109 | |
| Africa,Kenya,NAA,160 | |
| Asia,India,NSI,100 | |
| Asia,India,BSE,60 | |
| Asia,Pakistan,ISE,120 | |
| Asia,Pakistan,ANO,433 | |
| European Union,United Kingdom,LSE,550 | |
| European Union,United Kingdom,PLU,123 |
| 'genesis.json': | |
| { | |
| "alloc": { | |
| "0xca843569e3427144cead5e4d5999a3d0ccf92b8e": { | |
| "balance": "1000000000000000000000000000" | |
| }, | |
| "0x0fbdc686b912d7722dc86510934589e0aaf3b55a": { | |
| "balance": "1000000000000000000000000000" | |
| }, | |
| "0x9186eb3d20cbd1f5f992a950d808c4495153abd5": { |
| $ xidel -s https://www.anekalogam.co.id/id -e '$raw' > anekalogam.htm | |
| $ xidel -s anekalogam.htm -e '//div[@class="product-box"]//span[@class="n-heading"]' | |
| Rp 905.000 | |
| Rp 830.000 | |
| Rp 1.750.000 | |
| Rp 1.660.000 | |
| Rp 2.595.000 | |
| Rp 2.490.000 | |
| Rp 4.295.000 |