help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get title of web page by url?


From: Ted Zlatanov
Subject: Re: How to get title of web page by url?
Date: Wed, 08 Dec 2010 15:21:30 -0000
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

On Wed, 28 Jul 2010 16:12:52 +0200 Deniz Dogan <deniz.a.m.dogan@gmail.com> 
wrote: 

DD> 2010/7/28 Thamer Mahmoud <thamer.mahmoud@gmail.com>:
>>    (re-search-forward "<title>\\(.*\\)<[/]title>" nil t 1)

DD> Why [/] and not /?

DD> By the way, this will not work in scenarios where the title is spread
DD> out across multiple lines:

DD> <title>
DD>   Hello
DD> </title>

DD> How would you solve this in Emacs Lisp?

It will break in many other situations.  For example, it doesn't check
that the <title> tag is inside the <head> tag or remove comments.  It's
hard to parse HTML properly.

Ted


reply via email to

[Prev in Thread] Current Thread [Next in Thread]