473,394 Members | 1,750 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

newb: BeautifulSoup

I need to traverse a html page with big table that has many row and
columns. For example, how to go 35th td tag and do regex to retireve
the content. After that is done, you move down to 15th td tag from
35th tag (35+15) and do regex to retrieve the content?

Sep 21 '07 #1
3 1293
On Sep 20, 8:04 pm, crybaby <joemystery...@gmail.comwrote:
I need to traverse a html page with big table that has many row and
columns. For example, how to go 35th td tag and do regex to retireve
the content. After that is done, you move down to 15th td tag from
35th tag (35+15) and do regex to retrieve the content?
Make the file an xhtml file (valid xml) if it isn't already and then
you can use software written to process XML files:

http://pyxml.sourceforge.net/topics/
Sep 21 '07 #2
TheFlyingDutchman wrote:
On Sep 20, 8:04 pm, crybaby <joemystery...@gmail.comwrote:
>I need to traverse a html page with big table that has many row and
columns. For example, how to go 35th td tag and do regex to retireve
the content. After that is done, you move down to 15th td tag from
35th tag (35+15) and do regex to retrieve the content?

Make the file an xhtml file (valid xml) if it isn't already and then
you can use software written to process XML files:

http://pyxml.sourceforge.net/topics/
.... or just use software that can process XML and HTML the same way *and* that
supports XPath and tree iteration so that you can easily select the content
you want.

http://codespeak.net/lxml/

Stefan
Sep 21 '07 #3
En Fri, 21 Sep 2007 00:04:50 -0300, crybaby <jo***********@gmail.com>
escribi�:
I need to traverse a html page with big table that has many row and
columns. For example, how to go 35th td tag and do regex to retireve
the content. After that is done, you move down to 15th td tag from
35th tag (35+15) and do regex to retrieve the content?
See the examples at the BeautifulSoup page
http://www.crummy.com/software/BeautifulSoup/

--
Gabriel Genellina

Sep 21 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Steve Young | last post by:
I tried using BeautifulSoup to make changes to the url links on html pages, but when the page was displayed, it was garbled up and didn't look right (even when I didn't actually change anything on...
7
by: Gonzillaaa | last post by:
I'm trying to get the data on the "Central London Property Price Guide" box at the left hand side of this page http://www.findaproperty.com/regi0018.html I have managed to get the data :) but...
4
by: William Xu | last post by:
Hi, all, This piece of code used to work well. i guess the error occurs after some upgrade. >>> import urllib >>> from BeautifulSoup import BeautifulSoup >>> url = 'http://www.google.com'...
5
by: John Nagle | last post by:
This, which is from a real web site, went into BeautifulSoup: <param name="movie" value="/images/offersBanners/sw04.swf?binfot=We offer fantastic rates for selected weeks or days!!&blinkt=Click...
9
by: Mizipzor | last post by:
Is there a way to "subscribe" to individual topics? im currently getting bombarded with daily digests and i wish to only receive a mail when there is activity in a topic that interests me. Can this...
11
by: John Nagle | last post by:
The syntax that browsers understand as HTML comments is much less restrictive than what BeautifulSoup understands. I keep running into sites with formally incorrect HTML comments which are parsed...
5
by: Larry Bates | last post by:
Info: Python version: ActivePython 2.5.1.1 Platform: Windows I wanted to install BeautifulSoup today for a small project and decided to use easy_install. I can install other packages just...
3
by: bsagert | last post by:
I downloaded BeautifulSoup.py from http://www.crummy.com/software/BeautifulSoup/ and being a n00bie, I just placed it in my Windows c:\python25\lib\ file. When I type "import beautifulsoup" from...
2
by: academicedgar | last post by:
Hi I would appreciate some help. I am trying to learn Python and want to use BeautifulSoup to pull some data from tables. I was really psyched earlier tonight when I discovered that I could do...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.