mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-02 07:07:46 +00:00
parent
4a1ccf0e43
commit
7e59e5b9dd
1 changed files with 10 additions and 10 deletions
|
@ -6,15 +6,15 @@ let pages = ['headphone-amps' 'dacs' 'schiit-gaming-products' 'power-amplifiers'
|
|||
def main [] {
|
||||
$pages|par-each {|page|
|
||||
fetch $"($baseurl)($page)"
|
||||
|query web -q 'div.caption' -m
|
||||
|par-each {|item|
|
||||
$item
|
||||
|query web -q 'p.stock, h5'
|
||||
|rotate --ccw name availability
|
||||
|query web -q '.price, .stock, .product-item h5'
|
||||
|group 3
|
||||
|each {
|
||||
str trim
|
||||
|rotate --ccw name availability price
|
||||
}
|
||||
|flatten
|
||||
}
|
||||
|flatten
|
||||
|uniq
|
||||
|sort-by availability
|
||||
}
|
||||
|flatten
|
||||
|uniq
|
||||
|sort-by availability
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue