Accessing Web Page


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Accessing Web Page
# 1  
Old 06-06-2005
Question Accessing Web Page

Hello,

I am new to unix, but wanted to know how can we fetch data from a web page (i.e. an HTML Page), my requirement is to read an html page and wanted to create a flat file (text file) based on the contents available in the mentioned HTML page.

Thanks
Imtiaz
# 2  
Old 06-06-2005
MySQL

Hi !
Try html2text. This is from pkg-descr (FreeBSD ports).

Quote:
html2text is a command line utility, written in C++, that converts HTML documents (HTML 3.2) into plain text (ISO 8859-1). Each HTML document is loaded from a location indicated by an URI or read from standard input, and formatted into a stream of plain text characters that is written to standard output or into an output-file. The input-URI may specify a remote site, from that the documents are loaded with the Hypertext Transfer Protocol (HTTP). The program is even able to preserve the original positions of table fields and accepts also syntactically incorrect input, attempting to interpret it "reasonably". The rendering is largely customisable through an RC file. WWW: http://userpage.fu-berlin.de/~mbayer...html2text.html - Simon 'corecode' Schubert
# 3  
Old 06-06-2005
Accessing Web Page

Hi,

I am not looking out for converter i.e. HTML2TEXT but i want to know how we can acheive the same task using Unix, either by AWK or shell.

Thanks
Imtiaz
# 4  
Old 06-08-2005
Imtiaz,

I have a solution which doesnt use awk.

Here it is...

Code:
#! /bin/sh

while read line
do
echo $line | sed  -e 's/<[^>]*>//g'  
done < index.html

The script is quite explanatory. You can change the script quite easily to suit your needs i.e. parsing different html files, saving the extracted text et al..

Vino
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Accessing REST Web Service

Hello: I have created a REST service that is currently running on a Unix server. I issued a cURL command to call the REST service and verified it's working as designed; curl --request POST command and the url I used to test it is localhost:8090/someservice/somename. I have a teammate who now... (6 Replies)
Discussion started by: asthern14
6 Replies

2. Shell Programming and Scripting

Accessing the html page

Hi All, In our unix server we have an apache web server running. Now, I want to create my own webpage. Therefore I created webpage at /export/home/test.html file. Where do I need to place this file and what do I need mention this page in my web browser to access it. Without apache... (1 Reply)
Discussion started by: Arasu
1 Replies

3. UNIX for Dummies Questions & Answers

Accessing UNIX hosted web site remotely

Hi everyone- I'm relatively new to UNIX (Primarily Oracle background), wondering if anyone can help me. I did not configure Oracle Database Control (Web-Based admin interface) on the Database Server (HP-UX), however it is running and the URL is configured with an internal IP, which users have... (4 Replies)
Discussion started by: campbellg
4 Replies

4. UNIX for Dummies Questions & Answers

Accessing a HTML page

Hi All, In our unix server we have an apache web server running. I can access the default apache web page from my windows machine. Now, I want to create my own webpage. Therefore I created webpage at /export/home/myname/test.html file. Where do I need to place this file and what do I need... (2 Replies)
Discussion started by: pkm_oec
2 Replies

5. Solaris

Accessing a HTML page

Hi All, In our unix server we have an apache web server running. I can access the default apache web page from my windows machine. Now, I want to create my own webpage. Therefore I created webpage at /export/home/myname/test.html file. Where do I need to place this file and what do I need... (0 Replies)
Discussion started by: pkm_oec
0 Replies

6. Shell Programming and Scripting

File to web page

Hi all, I am having an XML file. And as per requirement I need to map fields of this file with various field of web page. So how can I use wput command into it ? Regards, gander_ss (3 Replies)
Discussion started by: gander_ss
3 Replies

7. Programming

fetching a web page in C

Hello, I'm a total newbie to HTTP commands, so I'm not sure how to do this. What I'd like is to write a C program to fetch the contents of a html page of a given address. Could someone help with this? Thanks in advance! (4 Replies)
Discussion started by: rayne
4 Replies

8. UNIX for Dummies Questions & Answers

making a web page

Hey im new to unix! I am tryin to create a web page in unix and have done it all but when i try and load it it says permission denied!?> i have chmod a+rx for folder and file to make sure but still permissions wont let me?! any ideas can anyone do a quick run through of how to make a web page... (4 Replies)
Discussion started by: shashora
4 Replies

9. UNIX for Dummies Questions & Answers

Web page hosting

I built my website based on Dreamweaver, on Windows platform. My server uses Unix, and the page doesn't look too good. Is there any way to solve this problem without too much of a headache? (1 Reply)
Discussion started by: PCL
1 Replies
Login or Register to Ask a Question