Thread: [Htmlparser-user] cookie
Brought to you by:
derrickoswald
From: <xia...@gm...> - 2006-03-29 07:39:38
|
I want to parse a web page that need to log in.so I use the wiki example bu= t can not work. the cookie expired when the browser shut down. Can you tell me how to handle this situation. -- Best Regards. Xiaodong Han MSN:hx...@ho... |
From: Derrick O. <Der...@Ro...> - 2006-03-29 12:52:26
|
You may need to 'POST' to the login form using the ConnectionManager with your credentials. See the doc-comments for src/org/htmlparser/tests/ParserTest.testPOST() for an example. ?? wrote: > I want to parse a web page that need to log in.so I use the wiki > example but can not work. the cookie expired when the browser shut down. > Can you tell me how to handle this situation. > > -- > Best Regards. > > Xiaodong Han > MSN:hx...@ho... <mailto:MSN:hx...@ho...> |
From: <xia...@gm...> - 2006-03-30 03:35:26
|
I tryed that but It still can not work, I research the web page flow and find that when you log in ,then server redirect you to another page. does the testPost() can handle this ? On 3/29/06, Derrick Oswald <Der...@ro...> wrote: > > You may need to 'POST' to the login form using the ConnectionManager > with your credentials. > See the doc-comments for src/org/htmlparser/tests/ParserTest.testPOST() > for an example. > > ?? wrote: > > > I want to parse a web page that need to log in.so I use the wiki > > example but can not work. the cookie expired when the browser shut down= . > > Can you tell me how to handle this situation. > > > > -- > > Best Regards. > > > > Xiaodong Han > > MSN:hx...@ho... <mailto:MSN:hx...@ho...> > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 > _______________________________________________ > Htmlparser-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlparser-user > -- Best Regards. Xiaodong Han MSN:hx...@ho... |
From: <xia...@gm...> - 2006-03-30 04:27:45
|
TXkgY29kZSBpcyBzb21ldGhpbmcgbGlrZSB0aGlzOgoKICAgICAgICAgICAgdXJsID0gbmV3IFVS TCAoIgpodHRwOi8vd3d3LnRqZnc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aGFuQGhvdG1h aWwuY29tCg== |
From: Derrick O. <Der...@Ro...> - 2006-03-30 12:21:30
|
No, there is a 'FollowRedirects' flag that automatically follows it. See the discussion in RFE #1436082 Follow redirections with cookie processing http://sourceforge.net/tracker/index.php?func=detail&aid=1436082&group_id=24399&atid=381402 ?? wrote: > I tryed that but It still can not work, I research the web page flow > and find that > when you log in ,then server redirect you to another page. > does the testPost() can handle this ? > > > On 3/29/06, *Derrick Oswald* <Der...@ro... > <mailto:Der...@ro...>> wrote: > > You may need to 'POST' to the login form using the ConnectionManager > with your credentials. > See the doc-comments for > src/org/htmlparser/tests/ParserTest.testPOST() > for an example. > > ?? wrote: > > > I want to parse a web page that need to log in.so I use the wiki > > example but can not work. the cookie expired when the browser > shut down. > > Can you tell me how to handle this situation. > > > > -- > > Best Regards. > > > > Xiaodong Han > > MSN:hx...@ho... <mailto:MSN:hx...@ho...> > <mailto:MSN <mailto:MSN>:hx...@ho... > <mailto:hx...@ho...>> > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the > live webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642> > _______________________________________________ > Htmlparser-user mailing list > Htm...@li... > <mailto:Htm...@li...> > https://lists.sourceforge.net/lists/listinfo/htmlparser-user > <https://lists.sourceforge.net/lists/listinfo/htmlparser-user> > > > > > -- > Best Regards. > > Xiaodong Han > MSN:hx...@ho... <mailto:MSN:hx...@ho...> |
From: <xia...@gm...> - 2006-03-31 07:24:43
|
in this topic ,you said the connectionManager can handle the cookie and redirect. but how to use this object set cookie for parse another page. because parge another page need cookie to be set. On 3/30/06, Derrick Oswald <Der...@ro...> wrote: > > > No, there is a 'FollowRedirects' flag that automatically follows it. > See the discussion in RFE #1436082 Follow redirections with cookie > processing > > > http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D1436082&grou= p_id=3D24399&atid=3D381402 > > > ?? wrote: > > > I tryed that but It still can not work, I research the web page flow > > and find that > > when you log in ,then server redirect you to another page. > > does the testPost() can handle this ? > > > > > > On 3/29/06, *Derrick Oswald* <Der...@ro... > > <mailto:Der...@ro...>> wrote: > > > > You may need to 'POST' to the login form using the ConnectionManage= r > > with your credentials. > > See the doc-comments for > > src/org/htmlparser/tests/ParserTest.testPOST() > > for an example. > > > > ?? wrote: > > > > > I want to parse a web page that need to log in.so I use the wiki > > > example but can not work. the cookie expired when the browser > > shut down. > > > Can you tell me how to handle this situation. > > > > > > -- > > > Best Regards. > > > > > > Xiaodong Han > > > MSN:hx...@ho... <mailto:MSN:hx...@ho...> > > <mailto:MSN <mailto:MSN>:hx...@ho... > > <mailto:hx...@ho...>> > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > language > > that extends applications into web and mobile media. Attend the > > live webcast > > and join the prime developer group breaking into this new coding > > territory! > > > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 > > < > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642> > > _______________________________________________ > > Htmlparser-user mailing list > > Htm...@li... > > <mailto:Htm...@li...> > > https://lists.sourceforge.net/lists/listinfo/htmlparser-user > > <https://lists.sourceforge.net/lists/listinfo/htmlparser-user> > > > > > > > > > > -- > > Best Regards. > > > > Xiaodong Han > > MSN:hx...@ho... <mailto:MSN:hx...@ho...> > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 > _______________________________________________ > Htmlparser-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlparser-user > -- Best Regards. Xiaodong Han MSN:hx...@ho... |
From: Derrick O. <Der...@Ro...> - 2006-03-31 12:46:31
|
The only documentation is in the http package javadocs: http://htmlparser.sourceforge.net/javadoc/org/htmlparser/http/package-summary.html ?? wrote: > in this topic ,you said the connectionManager can handle the cookie > and redirect. > but how to use this object set cookie for parse another page. > because parge another page need cookie to be set. > On 3/30/06, *Derrick Oswald* <Der...@ro... > <mailto:Der...@ro...>> wrote: > > > No, there is a 'FollowRedirects' flag that automatically follows it. > See the discussion in RFE #1436082 Follow redirections with cookie > processing > > http://sourceforge.net/tracker/index.php?func=detail&aid=1436082&group_id=24399&atid=381402 > <http://sourceforge.net/tracker/index.php?func=detail&aid=1436082&group_id=24399&atid=381402> > > > ?? wrote: > > > I tryed that but It still can not work, I research the web page flow > > and find that > > when you log in ,then server redirect you to another page. > > does the testPost() can handle this ? > > > > > > On 3/29/06, *Derrick Oswald* <Der...@ro... > <mailto:Der...@ro...> > > <mailto:Der...@ro... > <mailto:Der...@ro...>>> wrote: > > > > You may need to 'POST' to the login form using the ConnectionManager > > with your credentials. > > See the doc-comments for > > src/org/htmlparser/tests/ParserTest.testPOST() > > for an example. > > > > ?? wrote: > > > > > I want to parse a web page that need to log in.so I use the wiki > > > example but can not work. the cookie expired when the browser > > shut down. > > > Can you tell me how to handle this situation. > > > > > > -- > > > Best Regards. > > > > > > Xiaodong Han > > > MSN:hx...@ho... <mailto:MSN:hx...@ho...> > <mailto:MSN <mailto:MSN>: hx...@ho... > <mailto:hx...@ho...>> > > <mailto:MSN <mailto:MSN> <mailto:MSN > <mailto:MSN>>:hx...@ho... <mailto:hx...@ho...> > > <mailto: hx...@ho... <mailto:hx...@ho...>>> > > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > language > > that extends applications into web and mobile media. Attend the > > live webcast > > and join the prime developer group breaking into this new coding > > territory! > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642> > > > <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642>> > > _______________________________________________ > > Htmlparser-user mailing list > > Htm...@li... > <mailto:Htm...@li...> > > <mailto:Htm...@li... > <mailto:Htm...@li...>> > > https://lists.sourceforge.net/lists/listinfo/htmlparser-user > <https://lists.sourceforge.net/lists/listinfo/htmlparser-user> > > <https://lists.sourceforge.net/lists/listinfo/htmlparser-user> > > > > > > > > > > -- > > Best Regards. > > > > Xiaodong Han > > MSN:hx...@ho... <mailto:MSN:hx...@ho...> > <mailto:MSN <mailto:MSN>:hx...@ho... > <mailto:hx...@ho...>> > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the > live webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642> > _______________________________________________ > Htmlparser-user mailing list > Htm...@li... > <mailto:Htm...@li...> > https://lists.sourceforge.net/lists/listinfo/htmlparser-user > > > > > -- > Best Regards. > > Xiaodong Han > MSN:hx...@ho... <mailto:MSN:hx...@ho...> |
From: Vishal M. <mon...@ho...> - 2006-04-02 16:46:52
|
Hi Everybody, I have used this htmlparser in my project and the next week I have to give presentation for this. I have few question about htmlparser. 1) What kind of parsing technique is used to develop it. Top down parsing or Bottom up parsing. 2) How one can figure it out that it is is using top down parsing / bottom up parsing technique is used. Thanks in advance. Regards, Vishal Monpara _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ |
From: Derrick O. <Der...@Ro...> - 2006-04-03 00:15:36
|
I guess it would be considered top down parsing. The lexer is under the direction of a scanner for each tag, which knows the 'production rule'. To figure it out I think you look for 'push' or 'pull'. Is something pulling (see IteratorImpl.nextNode()) or is it event driven and something is reacting to lower level lexeme recognition. Vishal Monpara wrote: > Hi Everybody, > > I have used this htmlparser in my project and the next week I have to > give presentation for this. I have few question about htmlparser. > > 1) What kind of parsing technique is used to develop it. Top down > parsing or Bottom up parsing. > 2) How one can figure it out that it is is using top down parsing / > bottom up parsing technique is used. > > Thanks in advance. > > Regards, > Vishal Monpara > |
From: <xia...@gm...> - 2006-04-04 12:17:18
|
I try to use connectionManager but it can not hold the connection to web server. that is to say when you post your credential to server ,you cookie message could not be hold for second connection. I change httpclient to hold cookie message to solve this . On 4/3/06, Derrick Oswald <Der...@ro...> wrote: > > > I guess it would be considered top down parsing. The lexer is under the > direction of a scanner for each tag, which knows the 'production rule'. > > To figure it out I think you look for 'push' or 'pull'. Is something > pulling (see IteratorImpl.nextNode()) or is it event driven and > something is reacting to lower level lexeme recognition. > > Vishal Monpara wrote: > > > Hi Everybody, > > > > I have used this htmlparser in my project and the next week I have to > > give presentation for this. I have few question about htmlparser. > > > > 1) What kind of parsing technique is used to develop it. Top down > > parsing or Bottom up parsing. > > 2) How one can figure it out that it is is using top down parsing / > > bottom up parsing technique is used. > > > > Thanks in advance. > > > > Regards, > > Vishal Monpara > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 > _______________________________________________ > Htmlparser-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlparser-user > -- Best Regards. Xiaodong Han MSN:hx...@ho... |