At 2006-05-19 16:18, Mauro Tortonesi wrote:
>Andrea Rimicci wrote:
>> Hi all,
>> I'd like retrieve a web document where some links are coded in
>> javascript calls, so I'd like instruct wget when a something like
>> JSfunc('my/link/to/follow/') is matched, he recognize
>> 'my/link/to/follow/' as a link to follow.
>>
>> Is there any way to accomplish this?
>> Maybe using regexps, to setup which patterns will trigger the link,
>> will be great.
>>
>> TIA, Andrea
>>
>> P.S. dunno if this was already discussed, Ive not found any previous
>> post with 'follow' in subject.
>
>hi andrea,
>
>wget does not support parsing of javascript code at the moment, nor
>regexps on downloaded file content. however, we are planning to add
>support for regexps in wget 1.12, and possibly for external url parsers.

Thx for reply,
If any specs about the issue are still ongoing discussion, Id like suggest to use something like the sed -f or -e switches, to make me able to write an external text file, handled by wget, with sed-like syntax, so I can reach my goal with some lines like:
f/JSfunc('\(.*\)'/\1/g
f/AnotherFunc('\(.*\)'/\1/g

where f means follow, and \1 is the link that will be handled (put in d/l queue, convert to local path, and so on) by wget.

Then I can call wget -<switch to define> file.txt -<other switches> etc. to get the job accomplished.

Hope the example is clear enough to show this idea.

Thanks again, Andrea


Reply via email to