get homepage and save it


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting get homepage and save it
# 1  
Old 07-25-2010
get homepage and save it

Hello everyone,

I am searching for a way to open a webpage out of the shell and then save it's source to a file. Simply using wget doesn't work as there is java involved.
So my idea was to open the URL in firefox (or any other browser) where it it can be opened and then save the source to a file.

Unfortunately I did not find any way to make firefox automatically write the source of the opened page (...without further clicking...). Is there a way to do this out of the shell? Maybe with another browser?

Any Ideas from all the smart folks around here?

Thanks, cheers

shimaric
# 2  
Old 07-25-2010
I don't understand the problem with wget.
Do you want to execute the java, not just copy it?
Do you need to also get links included in the page? (Try the -r switch.)

If the filename has a funny extension, you can use --force-html to force wget to behave better.

Finally, if you are trying to retrieve source as it looks before any server-side java executes, I think you are out of luck.

Also note that the curl command does the same thing wget does, but with a different syntax. If there is some wget peculiarity you don't like, curl may work better for you.
# 3  
Old 07-26-2010
Quote:
If the filename has a funny extension, you can use --force-html to force wget to behave better.
Smilie

That solved everything! Smilie Thanks for your instant help!

cheers shimaric
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Save value from output of Corestat and save in a list for each core

I am trying to modify the "corestat v1.1" code which is in Perl.The typical output of this code is below: Core Utilization CoreId %Usr %Sys %Total ------ ----- ----- ------ 5 4.91 0.01 4.92 6 0.06 ... (0 Replies)
Discussion started by: Zam_1234
0 Replies

2. HP-UX

SYstem Management Homepage (SMH) Issues - HP-UX 11.11

I have a couple of issues with SMH running on HP-UX 11.11. The version numbers of the modules that I have loaded is below. 1) Does anyone have the "HPUX_EthernetLANEndpoint" or "HPUX_EthernetPort" modules on their server? I am getting errors within the SMH error log stating that these... (2 Replies)
Discussion started by: JDM_Nokia
2 Replies

3. Shell Programming and Scripting

Homepage stats ping

Hi guys I need a script that can ping a list of hosts and print the output to my homepage, with the result "running" or "dead". I'm new in this so please be patient with me. Can anybody help me? (1 Reply)
Discussion started by: NickB
1 Replies

4. Shell Programming and Scripting

Save cURL verbose output to file or do it like browser "save as.."

hi there ! i have exactly the same problem like this guy here https://www.unix.com/shell-programming-scripting/127668-getting-curl-output-verbose-file.html i am not able to save the curl verbose output.. the sollution in this thread (redirecting stderr to a file) does not work for me.... (0 Replies)
Discussion started by: crabmeat
0 Replies

5. Shell Programming and Scripting

Open google homepage with search results

Hi, we can open firefox Google to open a webpage.But, how can I open the firefox directly with the search term given at commandline and directly display the page with search results. (1 Reply)
Discussion started by: ramkishore
1 Replies

6. UNIX for Dummies Questions & Answers

Set up apache to point at my homepage

I have just install apache 1.3.22 on my solaris 2.6 with virtualhost which is working fine but I want to configure my httpd.conf file so that when I type in my url on an internet browsers it goes straight to my home page. eg www.mydomain.com should display my home page at the monent when I type... (4 Replies)
Discussion started by: hassan2
4 Replies
Login or Register to Ask a Question