<div dir="ltr"><br clear="all"><br><div class="gmail_quote">On Fri, Sep 28, 2012 at 1:10 PM,  <span dir="ltr"><<a href="mailto:tutor-request@python.org" target="_blank">tutor-request@python.org</a>></span> wrote:<br>
<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote">Date: Sun, 16 Sep 2012 12:50:09 +0530<br>
From: Santosh Kumar <<a href="mailto:sntshkmr60@gmail.com">sntshkmr60@gmail.com</a>><br>
To: <a href="mailto:tutor@python.org">tutor@python.org</a><br>
Subject: [Tutor] list all links with certain extension in an html file<br>
        python<br>
Message-ID:<br>
        <<a href="mailto:CAE7MaQa53X8Pav96q2ka0VajHnJtRZ_rgZcmH_cbsaQDiz5GGg@mail.gmail.com">CAE7MaQa53X8Pav96q2ka0VajHnJtRZ_rgZcmH_cbsaQDiz5GGg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
I want to extract (no I don't want to download) all links that end in<br>
a certain extension.<br>
<br>
    <link rel="stylesheet" type="text/css" href="<a href="http://foo.bar/part1.css" target="_blank">http://foo.bar/part1.css</a>"><br>
<br>
Please note that I don't want to download those CSS, instead I want<br>
something like this (to stdout):<br>
<br>
    <a href="http://foo.bar/part1.css" target="_blank">http://foo.bar/part1.css</a><br>
<br>
Also I don't want to use external libraries. I am asking for: which<br>
libraries and functions should I use?<br>
<br>
<br></blockquote><div>do you mean, you want to parse the file and the URL of those css files, then parse the file, there are many parsing options <a href="http://lxml.de/parsing.html">http://lxml.de/parsing.html</a>  <br>
<br>you don't have to use external libraries either, you may use <a href="http://docs.python.org/library/htmlparser.html">http://docs.python.org/library/htmlparser.html</a>  or regular expressions<br><br>or may be I did't understood what you really want to do.</div>
<div><br>Br</div><div>- Hussain</div></div></div>