🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.comp.lang.asp
Article #83

Re: 求助--一段asp语句

#83
From: NewBlue
Date: Wed, 10 Nov 2004 17:47
35 lines
2665 bytes
�Ҷ�ASP���죬�����python������Ҫ�Ĺ�����pythonʵ���ˣ�����߲��Ե���ͨ��

import re
html = """links list"""
html = re.sub ("\n","",html)
html = re.sub ("<br>","<br>\n",html)
pool = html.split ("<br>\n")
for url in pool:
    match = re.match
    (".*(http://www.arongsoft.net/down.asp\?id=\d*&no=\d*).*>(.*)</a>.*",
    html);
    if match:
        print ">>"+ match.group(2).__str__()+"\n\t==>"+match.group(1).__str__ ()

ʵ�ֵñȽϲ������һ������ƥ����ɣ���Ϊ��Ҫ�����ȡ�������б�����↑
ʼ������Ž�������������ۡ���ʵǰЩ���Ӿ������ץ����Ͱ������һЩ��
������������֮�󣬲��Ǻ����⣬��Ϊ��Ҫ������ҳ�棬�Ƚ��鷳��

����python�и�html��������ģ�飬���ԺܺõĽ��������⣬���ǵ��Ե�ʱ��û
ͨ��ֻ���Լ�д��������Ϊ��д�ϵ�һ��bug���ѡ�����������->��һ�����ˣ�
���Ǻܶ��⡣

Ҫȥ˯���ˡ�

[newblue@localhost ~]#cat �dz�ǰ

> ��Ҫʵ��һ�ι���:
>
> ����һ��ԭʼ���ַ�����:(û���Զ�����,��һ�����е�)

-- 
�Դ����뿪���Ժ���һֱ�ȴ��������
������ļ�����Ȼ����ļ����Ż������
Homepage:[http://newblue.at.3322.org/]
Technical Details
Message-ID: <m3u0rxr3z5.fsf@yaako.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsfeed.media.kyoto-u.ac.jp!newsgate.cuhk.edu.hk!news.cn99.com!news.yaako.com!not-for-mail
References: <419730ef.19312790@News.yaako.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 107c7f,5fca0a771516044b
X-Google-Attributes: gid107c7f,public
X-Google-Language: Chinese,GB
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsfeed.media.kyoto-u.ac.jp!newsgate.cuhk.edu.hk!news.cn99.com!news.yaako.com!not-for-mail
From: NewBlue <NewBlue@yaako.com>
Newsgroups: cn.comp.lang.asp,cn.comp,cn.fan
Subject: Re: 求助--一段asp语句
Date: Thu, 11 Nov 2004 01:47:10 +0800
Organization: NewBlue's personal homepage http://newblue.at.3322.org
Lines: 35
Message-ID: <m3u0rxr3z5.fsf@yaako.com>
References: <419730ef.19312790@News.yaako.com>
NNTP-Posting-Host: 218.15.111.184
Mime-Version: 1.0
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: 8bit
X-Trace: news.yaako.com 1100108976 23142 218.15.111.184 (10 Nov 2004 17:49:36 GMT)
X-Complaints-To: usenet@news.yaako.com
NNTP-Posting-Date: Wed, 10 Nov 2004 17:49:36 +0000 (UTC)
User-Agent: Emacs+gnus
Cancel-Lock: sha1:MoTdsK8csK10J9H/nn30C3RfA+U=