[Linux-programlama] Re: Python ile html parsing

---------

[Linux-programlama] Re: Python ile html parsing

From: Necmettin Begiter <necmettin.begiter_at_gmail.com>
Date: Sat, 17 Nov 2007 17:33:30 +0200
Message-Id: <200711171733.30817.necmettin.begiter@gmail.com>

On Saturday 17 November 2007 17:14:22 Caglar Akyuz wrote:
> regular expression ile. Ben aşağıdakine benzer bir kod kullanıyorum.
> Deneme şansım yok, o yüzden yazım hatası olabilir:
>
> import re
> html = open('/dosya/yolu','r')
> regex = re.compile(r'<href=*>')
>
> for line in html.readlines():
> line
> href = re.findall(regex,line)
> if href: #birşeyler buldu
> for s in href:
> print s
>
> html.close()

Peki adam olmadık bir yerde satırı böldüyse? :

<a href=
"ıyk.html">şurada
</a>
_______________________________________________
Linux-programlama mailing list
Linux-programlama_at_liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux-programlama
Received on Sat 17 Nov 2007 - 16:59:17 EET

---------

Bu arsiv hypermail 2.2.0 tarafindan uretilmistir.