Wget and single page


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Wget and single page
# 1  
Old 09-27-2012
Wget and single page

Good evening to all!!

I'm trying to become familiar with wget.
I would like to download a page from Wikipedia with all images and CSSs but without going down to all links present in the page. It should be named index.html.
I would like also to save it to /mnt/us inside a new folder.

This is what I'm using now, but it saves all pages linked to the one I want to download.

Code:
PAGES="/mnt/us/"
webpage="http://it.wikipedia.org/wiki/Robot"

wget -e robots=off --quiet --mirror --page-requisites --no-parent --convert-links --adjust-extension -P "$PAGES" -U Mozilla "$webpage"

Thanks a lot to everyone!!
# 2  
Old 09-27-2012
--mirror turns on recursion, delete that option.
# 3  
Old 09-27-2012
I tried and it downloads only Robots.html without images or anything alse...
# 4  
Old 09-27-2012
wget -p should be all that's required to download a single webpage and its prerequisites, according to the manpage. You're correct in that it doesn't. This would be a bug, or perhaps a problem with how the webpage is arranged. Complicated javascript things of course wouldn't work in wget.
# 5  
Old 09-28-2012
It seems -p option doesn't work only with wikipedia....Smilie
# 6  
Old 09-28-2012
Like I said, it depends on the content of the page. wget is not really a web browser and may not perfectly or fully support all HTML syntax.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Wget - working in browser but cannot download from wget

Hi, I need to download a zip file from my the below US govt link. https://www.sam.gov/SAMPortal/extractfiledownload?role=WW&version=SAM&filename=SAM_PUBLIC_MONTHLY_20160207.ZIP I only have wget utility installed on the server. When I use the below command, I am getting error 403... (2 Replies)
Discussion started by: Prasannag87
2 Replies

2. Shell Programming and Scripting

Random web page download wget script

Hi, I've been attempting to create a script that downloads web pages at random intervals to mimic typical user usage. However I'm struggling to link $url to the URL list and thus wget complains of a missing URL. Any ideas? Thanks #!/bin/sh #URL List url1="http://www.bbc.co.uk"... (14 Replies)
Discussion started by: shadyuk
14 Replies

3. Shell Programming and Scripting

script for adding page number before page breaks

Hi, If there is an expert that can help: I have many txt files that are produced from pdftotext that include page breaks the page breaks seem to be unix style hex 0C. I want to add page numbers before each page break as in : Page XXXX Regards antman (9 Replies)
Discussion started by: antman
9 Replies

4. Shell Programming and Scripting

Print multiple copies page by page using lp command

Hi I have a pdf file that is being generated using the rwrun command in the shell script. I then have the lp command in the shell script to print the same pdf file. Suppose there are 4 pages in the pdf file , I need to print 2 copies of the first page, 2 copies of the second page , then 2... (7 Replies)
Discussion started by: megha2525
7 Replies

5. Web Development

Page load time- local page

Hi Is there a way to calculate the page load time, I am trying to calculate the load time of a page locally. I found tools to do this over http or https but none that work locally. Any ideas? Thanks. (4 Replies)
Discussion started by: jamie_123
4 Replies

6. UNIX for Dummies Questions & Answers

display command output page per page

Good afternoon, I wonder how i could use unix commands to ease the reading of long command result output ? like the "php -i" or any other command that returns a long answer. I could not find the right terms to Google it or search the forum. Therefore I bother you with this question. ... (3 Replies)
Discussion started by: Mat_k
3 Replies

7. Shell Programming and Scripting

cgi script to print all .png files on a single page

Hi guys I'm relativley new to Perl, and have not touched html before, im trying to write a cgi script that prints all images on a single html page from a given directory. Im using perl to gather stats, rrdtool to update and create graphs now i just need to print these graphs all onto 1 index.cgi... (3 Replies)
Discussion started by: jeffersno1
3 Replies

8. Shell Programming and Scripting

WGET cycling on an updating page

Hello, I am experiencing an issue while downloading a few pages using wget. All of them work without a problem except one which is a page that does a tail on the log and as a result is constantly getting updated. wget here seems to run endlessly and needs to be manually killed. I wanted to... (0 Replies)
Discussion started by: prafulnama
0 Replies

9. UNIX for Dummies Questions & Answers

wget with semicolon in page name

So, I'd like to wget a webpage, as its not going to stick around forever - but the problem is the webpage has a semicolon in it. wget http://example.com/stuff/asdf;asdf obviously doesn't get the right webpage. Any good way around this? (2 Replies)
Discussion started by: Julolidine
2 Replies

10. Shell Programming and Scripting

How to get the page size (of a url) using wget

Hi , I am trying to get page size of a url(e.g.,www.example.com) using wget command.Any thoughts what are the parameters i need to send with wget to get the size alone? Regards, Raj (1 Reply)
Discussion started by: rajbal
1 Replies
Login or Register to Ask a Question