Erlang/OTP Forums

Author Message

<  Yaws mailing list  ~  example of grabbing a web page

Guest
Posted: Tue Apr 20, 2010 5:50 pm Reply with quote
Guest
Does anyone have a sample of how to grab a web page with yaws? I
would like to have a .yaws page go grab a web page and then I think I
can use yaws_html to parse this data. Right now I have a python
script that can log in to a ssl web site, grab some page data and
parse it and send back some results. I'm trying to figure out how
this can be done with yaws.

Thx,

-wes

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist
Guest
Posted: Tue Apr 20, 2010 7:21 pm Reply with quote
Guest
You need a http client for that. ibrowse is very good:
http://github.com/cmullaparthi/ibrowse
Does yaws contain a html parser? I use the mochiweb html parser (mochiweb_html.erl).


Sergej

On Tue, Apr 20, 2010 at 7:49 PM, Wes James <comptekki@gmail.com (comptekki@gmail.com)> wrote:
Quote:
Does anyone have a sample of how to grab a web page with yaws?
Guest
Posted: Tue Apr 20, 2010 7:29 pm Reply with quote
Guest
On Tue, Apr 20, 2010 at 1:20 PM, Rapsey <rapsey@gmail.com> wrote:
> You need a http client for that. ibrowse is very good:
> http://github.com/cmullaparthi/ibrowse

thx, for this - I'll take a look.

> Does yaws contain a html parser? I use the mochiweb html parser

go to yaws main page ( http://yaws.hyber.org ) and search for
yaws_html. Looking back at that, maybe I can even use that to get web
pages - the way it is fraised.

> (mochiweb_html.erl).
>
>
> Sergej
>
> On Tue, Apr 20, 2010 at 7:49 PM, Wes James <comptekki@gmail.com> wrote:
>>
>> Does anyone have a sample of how to grab a web page with yaws?
Guest
Posted: Tue Apr 20, 2010 7:42 pm Reply with quote
Guest
Rapsey wrote:
> You need a http client for that. ibrowse is very good:
> http://github.com/cmullaparthi/ibrowse
> Does yaws contain a html parser?

It does, pretty functional too.

src/yaws_html.erl

Johan Bevemyr wrote it years ago, 2003 says the header ...

/klacke


------------------------------------------------------------------------------
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist
anders_n
Posted: Tue Apr 20, 2010 9:08 pm Reply with quote
User Joined: 28 Feb 2005 Posts: 155 Location: Saltillo, Mexico
On Tue, Apr 20, 2010 at 2:40 PM, Claes Wikstrom <klacke@tail-f.com> wrote:
> Rapsey wrote:
>> You need a http client for that. ibrowse is very good:
>> http://github.com/cmullaparthi/ibrowse
>> Does yaws contain a html parser?
>
> It does, pretty functional too.
>
> src/yaws_html.erl
>
> Johan Bevemyr wrote it years ago, 2003 says the header ...
>

Unfortunately it requires correct html to work. It does not like
the buggy/incomplete html that is common in the wild.

I rtried to use it some years ago but had to give up because the
pages I had to parse where too buggy.

/Anders

------------------------------------------------------------------------------
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post received from mailinglist
View user's profile Send private message Yahoo Messenger

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum