473,396 Members | 1,748 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,396 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 2196
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: 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:
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.