]> gitweb.factorcode.org Git - factor.git/commitdiff
use scrape-html instead of "http-get nip parse-html".
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 14 Aug 2015 19:13:35 +0000 (12:13 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 14 Aug 2015 19:14:04 +0000 (12:14 -0700)
extra/wikipedia/wikipedia.factor
extra/xkcd/xkcd.factor

index 9d609659f2bac3be634e91ff4f184544e8d43c4f..57335c444acf474a2448be70544dc659b42dbf6a 100644 (file)
@@ -48,7 +48,7 @@ SYMBOL: language
     [ month-name ] [ day>> ] bi "%s_%s" sprintf wikipedia-url ;
 
 : (historical-events) ( timestamp -- seq )
-    historical-url http-get nip string>xml "ul" deep-tags-named ;
+    historical-url scrape-html nip "ul" deep-tags-named ;
 
 : items>sequence ( tag -- seq )
     children-tags [ deep-children>string ] map ;
index d4410f32916a8e27d18551148d5bd16f01a08b04..cafe3399ed999d9bfb744904b66d3c5976dec8b8 100644 (file)
@@ -20,8 +20,7 @@ IN: xkcd
     comic-image image. ;
 
 : comic-text ( url -- string )
-    http-get nip parse-html
-    "transcript" find-by-id-between
+    scrape-html nip "transcript" find-by-id-between
     html-text html-unescape ;
 
 : comic-text. ( url -- )