473,320 Members | 2,024 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,320 software developers and data experts.

Need help getting BeautifulSoup contents


The trick to this one is that the html looks something like this:

<td width="100%" colspan="2">
american,
a href="/browse/blue" linkindex="12" set="yes">blue brick churn cottage
cream "

My question is I want everything inside, the contents of each ad the
regular text of the <td>.
I know I can do like a.contents, but it only gives me the first one, in this
case being "blue". I want the contents of each of those and the regular
contents of the <td>.

P.S. notice the things inbetween the <a tags, I need those too :(

Can anyone help?

--
View this message in context: http://www.nabble.com/Need-help-gett...p18501881.html
Sent from the Python - python-list mailing list archive at Nabble.com.

Jul 17 '08 #1
1 2186
I dont quite understand what u want. U should paste the html here
http://pastebin.com/ also provide the result that u want.

If u dont take the time to write what u wont, nobody will take the
time to help u

On Jul 17, 7:38*am, Alexnb <alexnbr...@gmail.comwrote:
The trick to this one is that the html looks something like this:

<td width="100%" colspan="2">
american,
a href="/browse/blue" linkindex="12" set="yes">blue brick churn cottage
cream "

My question is I want everything inside, the contents of each * ad the
regular text of the <td>.
I know I can do like a.contents, but it only gives me the first one, in this
case being "blue". I want the contents of each of those and the regular
contents of the <td>.

P.S. notice the things inbetween the <a tags, I need those too :(

Can anyone help?

--
View this message in context:http://www.nabble.com/Need-help-gett...ontents-tp1850...
Sent from the Python - python-list mailing list archive at Nabble.com.
Jul 17 '08 #2

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

Similar topics

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...
3
by: GinTon | last post by:
I'm trying to get the 'FOO' string but the problem is that inner 'P' tag there is another tag, 'a'. So: <p class="contentBody">FOO <a name="f"></a</p> So if I run 'print...
1
by: CSUIDL PROGRAMMEr | last post by:
folks, I am trying to write a script that would open a download server and download all the files and store them in a list for example Download server is...
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...
3
by: John Nagle | last post by:
Are weak refs slower than strong refs? I've been considering making the "parent" links in BeautifulSoup into weak refs, so the trees will release immediately when they're no longer needed. In...
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...
2
by: Alexnb | last post by:
Okay, I am not sure if there is a better way of doing this than findAll() but that is how I am doing it right now. I am making an app that screen scapes dictionary.com for definitions. However, I...
1
by: Alexnb | last post by:
Okay, what I want to do with this code is to got to thesaurus.reference.com and then search for a word and get the syns for it. Now, I can get the syns, but they are still in html form and some are...
0
by: Alexnb | last post by:
The trick to this one is that the html looks something like this: <td width="100%" colspan="2"> american, a href="/browse/blue" linkindex="12" set="yes">blue brick churn cottage cream " My...
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.