473,738 Members | 7,110 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Extract contents of html cells

Dear all,
I need to create a script which will extract the contents of 2 cells of
an html that contains a specified number of cells.Then I need to put
that contents in another cells of my own html page.How can i do that?Any
samples, tutorials, advice?

Feb 4 '06 #1
3 1500
Robot:
I need to create a script which will extract the contents of 2 cells of
an html that contains a specified number of cells.Then I need to put
that contents in another cells of my own html page.How can i do that?


http://www.python.org/doc/lib/module-htmllib.html

--
René Pijlman
Feb 4 '06 #2
Robot wrote:
Dear all,
I need to create a script which will extract the contents of 2 cells of
an html that contains a specified number of cells.Then I need to put
that contents in another cells of my own html page.How can i do that?Any
samples, tutorials, advice?


You should take a look at for the screen-scraping part:

http://www.crummy.com/software/BeautifulSoup/

To put them in your html page all you need to do is to have some
placeholders in your html and use python to replace the placeholders
with the values you get from the other screen.

-Larry Bates
Feb 4 '06 #3
Robot <ad**********@y ahoo.com> writes:
Dear all, I need to create a script which will extract the contents of 2 cells
of an html that contains a specified number of cells.Then I need to
put that contents in another cells of my own html page.How can i do
that?Any samples, tutorials, advice?


The tricky bit is parsing HTML. Chances are good that what you want
for that is BeautifulSoup:

http://www.crummy.com/software/BeautifulSoup/

Take a look at the examples there and then feel free to ask more
questions.

Jason
Feb 4 '06 #4

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

Similar topics

5
6917
by: Jane Doe | last post by:
Hi I took a quick look in the archives, but didn't find an answer to this one. I'd like to display a list of HTML files in a directory, showing the author's name between brackets after the file name. I can successfully extract the TITLE section, but no luck with the AUTHOR part. Any idea why?
12
19508
by: sneill | last post by:
Hello, I have the following HTML / CSS that draws 2 rows. Each row has 3 cells. I want the cells within each row to span a single line. Each cell is 100px wide, and the row containing them is 250px wide. Clearly the last cell won't fix, but rather than wrapping to the next 'line' within the row, I'd like the last cell to be clipped and only showing the first 50px. This code was developed in IE6. Can't say what it looks like in
0
905
by: John A Grandy | last post by:
if i wish to extract string values from a DataGrid.Items.Cells collection but convert any pure formatting characters to null-strings, what is the best method ? for example, DataGrid.SelectedItem.Cells(0)="&nbsp;" fr those cells that were bound to empty DataTable.Row.Columns .... however, i would like to retrieve them as null-strings ....
3
3377
by: Craig Petrie | last post by:
Hi, I have a large table in Word 2003 that has formatted text in the cells and wish to read and convert a cells formatted contents to html output via vb.net code. The formatting contains the following: bold text, italic text, superscript & subscript text, bullet points. The output html is then saved in an XML file as a CDATA section for later use in the application when formatted output is required. I have looked up many sites on the...
3
2164
by: Dhananjay | last post by:
Hello everyone Do you have any idea about how to generate a tool which will extract the contents and images from html page.or do you have any resources then let me know. i am using VS 2005 C#.net,Asp.net for development of this system. reply me asap Thanks Dhananjay
0
1192
by: manuel.reil | last post by:
Hello, currently i am developing a very small cms using python and cheetah. very early i have noticed that i was lacking the method to extract/recover the contents (html,text) from the html that is generated by cheetah and delivered to the site viewer. to explain it further: during the output processing by cheetah placeholders are replaced with my text/html input. to edit/alter the page i have to extract my personal input out of the...
1
3667
by: steveyjg | last post by:
I want to extract the following data from a retrieved html file and store the information as strings. 'get the text of "title" <h1 id="test_title">title</h1> 'get the contents of the value attribute <input name="test_code" type="text" value='<object </object>' > 'get the text of "category" or value of c <div class="smallText">
1
4790
by: Alberto Sartori | last post by:
Hello, I have a html text with custom tags which looks like html comment, such: "text text text <p>text</ptext test test text text text <p>text</ptext test test <!-- @MyTag@ -->extract this<!-- /@MyTag@ --> text text text <p>text</ptext test test <!-- @MyTag@ -->and this<!-- /@MyTag@ --> text text text <p>text</ptext test test"
1
3069
by: veer | last post by:
Hi i am making a program in which i want to extract data from html file . Actually there are two dates on html file i want to extract these dates but the main probleum is that these dates are different on each file. A word "AKTIVA" is always comes before these dates. i made this by seaching the activa word but after this i am not getting any idea how these dates can be accessed. i use one another method by transfering the whole data of...
0
8969
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8788
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9476
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9335
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
4570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4825
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3279
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2745
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.