Created
March 20, 2013 02:57
-
-
Save victorbstan/5201968 to your computer and use it in GitHub Desktop.
Quick and dirty test web scraper in Smalltalk (Pharo2). Simply put it in a "workspace" and "do it". The response output is sent to a "Transcript" window.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| myHost myPath | | |
"setup" | |
myHost := 'rmod.lille.inria.fr'. | |
myPath := '/pbe2'. | |
ZnClient new | |
systemPolicy; | |
accept: ZnMimeType textHtml; | |
http; | |
host: myHost; | |
path: myPath; | |
contentReader: [ :entity | Transcript show: entity asString ]; | |
ifFail: [ :exception | self inform: 'I am sorry: ', exception printString ]; | |
get. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment