Re: [elinks-users] Can I run elinks without terminal

2011-03-26 Thread Rudy Vener
You could try using the expect program to run your elinks process, 
examine the history and then process the rsults.

On Sat, Mar 26, 2011 at 08:14:39PM +0100, Simon Ruderich wrote:
> On Sat, Mar 26, 2011 at 09:54:04PM +0800, Tian You wrote:
> > Thx for your reply, Simon.
> >
> > Yes, I tried to use "-dump", but cannot reach my goal.
> > With -dump, there are two problems:
> > 1, history file is not touched.
> > 2, Can not handle redirection by meta tag and JavaScript.
> 
> Yeah, looks like it. So -dump won't work. Then you need a
> terminal.
> 
> > I try to use a browser, like Elinks, is because I want to find a way can
> > resolve those redirections by one solution.
> > And I'm sure Elinks could handle JavaScript better than my script :)
> 
> You could use Lua hooks to check the result (including the URL
> IIRC). But I'm not sure how they handle with redirects.
> 
> I still think that wget/curl is a better solution for this
> problem.
> 
> Regards,
> Simon
> -- 
> + privacy is necessary
> + using gnupg http://gnupg.org
> + public key id: 0x92FEFDB7E44C32F9



> ___
> elinks-users mailing list
> elinks-users@linuxfromscratch.org
> http://linuxfromscratch.org/mailman/listinfo/elinks-users


-- 
Rudy Vener, Owner and founder
Pizza Galaxy - Low cost Online ordering and Email marketing 
for independent, family owned  pizzerias and sub shops.
Phone: (203) 230-9662
Website: http://www.pizzagalaxy.com
___
elinks-users mailing list
elinks-users@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-users


Re: [elinks-users] Can I run elinks without terminal

2011-03-26 Thread Simon Ruderich
On Sat, Mar 26, 2011 at 09:54:04PM +0800, Tian You wrote:
> Thx for your reply, Simon.
>
> Yes, I tried to use "-dump", but cannot reach my goal.
> With -dump, there are two problems:
> 1, history file is not touched.
> 2, Can not handle redirection by meta tag and JavaScript.

Yeah, looks like it. So -dump won't work. Then you need a
terminal.

> I try to use a browser, like Elinks, is because I want to find a way can
> resolve those redirections by one solution.
> And I'm sure Elinks could handle JavaScript better than my script :)

You could use Lua hooks to check the result (including the URL
IIRC). But I'm not sure how they handle with redirects.

I still think that wget/curl is a better solution for this
problem.

Regards,
Simon
-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9


pgpYdryCJfsNG.pgp
Description: PGP signature
___
elinks-users mailing list
elinks-users@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-users


Re: [elinks-users] Can I run elinks without terminal

2011-03-26 Thread Tian You
Thx for your reply, Simon.

Yes, I tried to use "-dump", but cannot reach my goal.
With -dump, there are two problems:
1, history file is not touched.
2, Can not handle redirection by meta tag and JavaScript.

I try to use a browser, like Elinks, is because I want to find a way can
resolve those redirections by one solution.
And I'm sure Elinks could handle JavaScript better than my script :)

On Fri, Mar 25, 2011 at 9:32 PM, Simon Ruderich  wrote:

> On Fri, Mar 25, 2011 at 04:14:41PM +0800, Tian You wrote:
> > Hi guys,
> > I want to know can I run elinks without display the page, and exit after
> > loading of the page is finished.
>
> You could use -dump and redirect the output to /dev/null. But I'm
> not sure if this requires a terminal or can be run from a script.
>
> > What I want to do is to trace the URL redirection, no matter the
> redirection
> > is implemented by using HTTP head, meta tag or javascript.
>
> I'm not sure if Elinks' JavaScript support is sophisticated
> enough for all kinds of redirection; HTTP and meta tags should
> work fine.
>
> > If the elinks can work as I described above, then I can get the URL list
> > from the it's history file.
>
> Hm, looks like the history file is not touched when using -dump.
> Not sure if you can get Elinks to store it.
>
> > Any comments on this?
> >
> > Thanks,
> > Animal
>
> I think a simpler way would be to use wget/curl (it handles HTTP
> redirects) and a little script which searches for meta redirects
> and tries to find JavaScript redirects.
>
> Regards,
> Simon
> --
> + privacy is necessary
> + using gnupg http://gnupg.org
> + public key id: 0x92FEFDB7E44C32F9
>
> ___
> elinks-users mailing list
> elinks-users@linuxfromscratch.org
> http://linuxfromscratch.org/mailman/listinfo/elinks-users
>
>
___
elinks-users mailing list
elinks-users@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-users


Re: [elinks-users] Can I run elinks without terminal

2011-03-25 Thread Simon Ruderich
On Fri, Mar 25, 2011 at 04:14:41PM +0800, Tian You wrote:
> Hi guys,
> I want to know can I run elinks without display the page, and exit after
> loading of the page is finished.

You could use -dump and redirect the output to /dev/null. But I'm
not sure if this requires a terminal or can be run from a script.

> What I want to do is to trace the URL redirection, no matter the redirection
> is implemented by using HTTP head, meta tag or javascript.

I'm not sure if Elinks' JavaScript support is sophisticated
enough for all kinds of redirection; HTTP and meta tags should
work fine.

> If the elinks can work as I described above, then I can get the URL list
> from the it's history file.

Hm, looks like the history file is not touched when using -dump.
Not sure if you can get Elinks to store it.

> Any comments on this?
>
> Thanks,
> Animal

I think a simpler way would be to use wget/curl (it handles HTTP
redirects) and a little script which searches for meta redirects
and tries to find JavaScript redirects.

Regards,
Simon
-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9


pgpWQ3s3dpsGQ.pgp
Description: PGP signature
___
elinks-users mailing list
elinks-users@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-users