Skip to content

Commit

Permalink
loop added 301 error
Browse files Browse the repository at this point in the history
  • Loading branch information
spadidar committed Jan 18, 2012
1 parent 69023fa commit c533e2a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/run.erl
Expand Up @@ -2,12 +2,15 @@
-export([run_app/0]).

run_app() ->
%% downloader:download("www.bbc.co.uk"),
main:start("",""),
R = http_utils:get("http://tamale.net/erlang/tutorial.shtml"),
D = element(3,R),
T = mochiweb_html:tokens(D),
get_text(T),
halt().

get_text(Data) ->
lists:foreach(Funn,T).
get_text(Tokens) ->
Printer = fun(E) -> io:format("~p~n",[E]) end,
lists:foreach(Printer, Tokens).


0 comments on commit c533e2a

Please sign in to comment.