LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-04-2009, 12:19 PM   #1
fedoranew
LQ Newbie
 
Registered: Dec 2009
Posts: 1

Rep: Reputation: 0
command/script to download all the components of a webpage


Hi,

Been searching endlessly for a command line tool/utility that downloads all the components of a webpage, given a URL. As in,

$<some_command> http://someurl.com

should fetch the base html and all the required components necessary for rendering the page, which includes all the images, css, js, advertisements etc. Essentially it should emulate the browser. The reason I'm looking for such a tool is to measure the response time of a website for a given URL from the command line. I know of several GUI tools like HTTPFox, Ethereal/Wireshark that serve the same purpose. But none in CLI.

There are wget and curl. But from what I understand they can just fetch the contents of the given URL and don't parse the html to download all other components.

wget does do recursive download. But the problem is, it goes ahead and fetches all those <a href> pages too, which I don't want. Given a URL, the browser gets the html first, parses it, and then downloads each component (css, js, images) that it needs to render the page. Is there a command line tool/script that can accomplish the same task?

TIA!
 
Old 12-05-2009, 05:49 AM   #2
Davno
Member
 
Registered: Mar 2004
Location: Montreal, Canada
Distribution: Linux MX 23 KDE "Libretto"
Posts: 213

Rep: Reputation: 25
I once received an e-mail saying that i needed to change my password to my bank account and there was a link to the site. Luckily i saw a little discripancy in the url adress. This was not the real bank website but a fake one.
Hummmm.
 
Old 12-05-2009, 08:09 AM   #3
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
I always just do 'Save Page As' from the Firefox web browser. It creates an html page, and a folder with all the other stuff to render the page.
 
Old 12-05-2009, 11:05 PM   #4
pobrika
Member
 
Registered: Jan 2008
Location: Bournemouth, UK
Distribution: Mint, #!, Fedora, Redhat, Centos
Posts: 70

Rep: Reputation: 18
You could always look into links or lynx, these are cmd line web browsers, there plenty of switches for dumping contents to disk I tend to use links.
 
Old 12-07-2009, 03:11 AM   #5
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
Code:
man wget
info wget
should help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to download a webpage with all the gif (wget or something else)? frenchn00b Linux - General 3 05-23-2009 11:02 PM
script to download a webpage pankaj99 Programming 4 09-23-2006 06:28 AM
using ftp to download whole folder -- script or command ? hq4ever Linux - Networking 7 10-22-2004 11:41 AM
CGI script problem: Send/Expect command echo on webpage rajatgarg Programming 2 07-11-2004 04:38 PM
Stalled WebPage Load/No Download DigitMole Mandriva 2 02-02-2004 05:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration