Ramdas wrote:
> I am doing some HTML scrapping for a side project.
>
> I need a method using sgmllib or HTMLParser to parse an HTML file and
> get line nos of all the tags
Try lxml.html, it provides line numbers for each element.
http://codespeak.net/lxml/dev/
Stefan
--
http://mail.python.org/
On Dec 13, 9:01 am, Ramdas <[EMAIL PROTECTED]> wrote:
> Hi Paul,
>
> I am cross posting the same to grab your attention at pyparsing forums
> too. 1000 apologies on the same count!
>
> I am a complete newbie to parsing and totally new to pyparsing.
>
> I have adapted your code to store the line num
Hi Paul,
I am cross posting the same to grab your attention at pyparsing forums
too. 1000 apologies on the same count!
I am a complete newbie to parsing and totally new to pyparsing.
I have adapted your code to store the line numbers as below.
Surprisingly, the line numbers printed, when I s
Hi Paul,
I am cross posting the same to grab your attention at pyparsing forums
too. 1000 apologies on the same count!
I am a complete newbie to parsing and totally new to pyparsing.
I have adapted your code to store the line numbers as below.
Surprisingly, the line numbers printed, when I scrap
Hey paul,
Thanks a Ton!
Never heard of pyparsing module.
This is more a hobby, than any homework.
This is exactly what I wanted.
I am scrapping a few web pages for data.
I am using Beautiful Soup for tag extraction. However for some quirky
reasons, I need to reference back to the exact line n
On Dec 12, 3:56 pm, Ramdas <[EMAIL PROTECTED]> wrote:
> I am doing some HTML scrapping for a side project.
>
> I need a method using sgmllib or HTMLParser to parse an HTML file and
> get line nos of all the tags
>
Homework, perhaps? Well, I don't think your instructor will give many
points for a p
Ramdas wrote:
> I am doing some HTML scrapping for a side project.
>
> I need a method using sgmllib or HTMLParser to parse an HTML file and
> get line nos of all the tags
>
> I tried a few things, but I am just not able to work with either if
> the parsers.
>
>
>
> Can someone help
>
HTML d