mlisp/tmp/html_scrap.lsp

16 lines
323 B
Plaintext

;read file
(define web (read-file "/tmp/finviz_quote_syf.html"))
(print "file read")
; remove head section
(define pos (string-find web "<body" 0))
(define web2 (string-substr web pos 1000000))
; remove scripts
(define web3 (string-replace web2 "<script(.*?)>((.|\r?\n)*?)</script>" ""))
; extract tables
(print web3)