mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 11:33:41 +03:00
support %pig scrapers
This commit is contained in:
parent
d291d0b59e
commit
56bbfa7eea
@ -518,6 +518,35 @@
|
||||
[%pro pom(cad [':' ' ' cad.pom])]
|
||||
==
|
||||
::
|
||||
++ dy-made-scar :: scraper product
|
||||
|= cag=cage
|
||||
^+ +>+>
|
||||
?. ?=(^ q.q.cag)
|
||||
(dy-diff %err q.q.cag)
|
||||
=+ tan=((list tank) +2.q.q.cag)
|
||||
=. +>+>.$ (he-diff %tan tan)
|
||||
=+ vax=(spec (slot 3 q.cag))
|
||||
~_ (sell q.cag)
|
||||
?+ -.q.vax !!
|
||||
%&
|
||||
?~ +.q.vax
|
||||
~& %dy-made-scar-abort
|
||||
(dy-rash %bel ~)
|
||||
(dy-meal (slot 7 vax))
|
||||
::
|
||||
%|
|
||||
=+ hiz=;;(hiss +<.q.vax)
|
||||
%- (slog leaf/"< {(earn p.hiz)}" ~)
|
||||
(dy-eyre(pro `(slap (slot 7 vax) cnzy/%q)) /scar hiz)
|
||||
==
|
||||
::
|
||||
++ dy-sigh-scar :: scraper result
|
||||
|= dat=cage
|
||||
?~ pro
|
||||
~& %dy-no-scraper
|
||||
(dy-show dat)
|
||||
(dy-slam(pux ~) /scar u.pro q.dat)
|
||||
::
|
||||
++ dy-made-gent :: generator product
|
||||
|= cag=cage
|
||||
(dy-meal q.cag)
|
||||
@ -669,6 +698,7 @@
|
||||
[%hand ~] dy-hand:dye
|
||||
[%dial ~] dy-made-dial:dye
|
||||
[%gent ~] dy-made-gent:dye
|
||||
[%scar ~] dy-made-scar:dye
|
||||
[%edit ~] dy-made-edit:dye
|
||||
==
|
||||
%| (he-diff(poy ~) %tan p.reg)
|
||||
@ -685,6 +715,7 @@
|
||||
?+ way !!
|
||||
[%hand ~] dy-hand:dye
|
||||
[%show ~] dy-show:dye
|
||||
[%scar ~] dy-sigh-scar:dye
|
||||
==
|
||||
::
|
||||
++ he-unto :: result from behn
|
||||
|
@ -71,8 +71,7 @@
|
||||
|* out=$+(* *) :: output structure
|
||||
%+ pair (list tank) ::
|
||||
%+ each (unit out) :: ~ is abort
|
||||
%+ pair (list hiss) :: ask
|
||||
$+((list httr) (sole-request out)) :: and continue
|
||||
(pair hiss $+(httr (sole-request out))) :: fetch and continue
|
||||
:: ::
|
||||
++ sole-gen :: XX virtual type
|
||||
$% [%cat $+((sole-args) (cask))] :: direct noun
|
||||
@ -99,10 +98,7 @@
|
||||
:: ::
|
||||
++ sole-at :: fetch url
|
||||
|* [pul=_purl fun=$+(httr *)] ::
|
||||
=< [p=*(list tank) q=[%| p=[pul %get ~ ~] q=.]] ::
|
||||
|= rez=(list httr) ::
|
||||
?> ?=([^ ~] rez) ::
|
||||
(fun i.rez) ::
|
||||
[p=*(list tank) q=[%| p=[pul %get ~ ~] q=fun]] ::
|
||||
:: ::
|
||||
++ sole-no :: empty result
|
||||
[p=*(list tank) q=~] ::
|
||||
|
Loading…
Reference in New Issue
Block a user