China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-12 13:34
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to download all web pages on this forum for offline use? View 2,798 Replies 16
Original Poster Posted 2010-03-10 22:37 ·  中国 河南 新乡 电信
初级用户
★★
Credits 96
Posts 83
Joined 2009-06-04 00:54
17-year member
UID 146648
Gender Male
From 信阳
Status Offline
How to download all web pages on this forum and use them offline?

[ Last edited by 740011611 on 2010-3-19 at 18:33 ]
Floor 2 Posted 2010-03-11 01:33 ·  中国 广东 韶关 电信
高级用户
★★★
CMD感染者
Credits 691
Posts 383
Joined 2008-05-23 00:38
18-year member
UID 119451
Gender Male
Status Offline
I'm afraid it's not easy to achieve
Floor 3 Posted 2010-03-11 03:10 ·  中国 上海 杨浦区 电信
初级用户
Credits 49
Posts 42
Joined 2009-11-26 04:39
16-year member
UID 155365
Gender Male
Status Offline
Floor 4 Posted 2010-03-11 21:40 ·  中国 四川 攀枝花 电信
初级用户
★★
Credits 147
Posts 131
Joined 2008-09-22 23:54
17-year member
UID 126352
Gender Male
Status Offline
Baidu search, full site download...
freedom!
Floor 5 Posted 2010-03-12 16:25 ·  中国 河南 新乡 联通
初级用户
★★
Credits 96
Posts 83
Joined 2009-06-04 00:54
17-year member
UID 146648
Gender Male
From 信阳
Status Offline
Thanks everyone, it's not easy to achieve! We can only do it manually.
Floor 6 Posted 2010-03-12 22:15 ·  中国 上海 电信
新手上路
Credits 15
Posts 14
Joined 2008-09-02 11:52
17-year member
UID 124565
Gender Male
Status Offline
Floor 7 Posted 2010-03-14 19:37 ·  中国 河南 新乡 电信
初级用户
★★
Credits 96
Posts 83
Joined 2009-06-04 00:54
17-year member
UID 146648
Gender Male
From 信阳
Status Offline
I don't know if Wget can achieve the goal of downloading the entire site.
wget -r -p -np -E -k http://www.cn-dos.net/forum/

I found that many web pages are downloaded repeatedly. What should I do?
Floor 8 Posted 2010-03-16 12:51 ·  中国 河南 新乡 电信
初级用户
★★
Credits 96
Posts 83
Joined 2009-06-04 00:54
17-year member
UID 146648
Gender Male
From 信阳
Status Offline
Help me? Moderator...
Floor 9 Posted 2010-03-16 13:42 ·  中国 重庆 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
www.google.cn

Note:

It is not that we hope the original poster can immediately master the usage of wget or curl through Google search, but that we hope the original poster can search for tools like "whole site download" that have been seen everywhere for many years.


[ Last edited by HAT on 2010-3-26 at 17:17 ]
Floor 10 Posted 2010-03-16 13:43 ·  中国 广东 电信
银牌会员
★★★★
SuperCleaner
Credits 2,362
Posts 1,133
Joined 2008-02-02 21:36
18-year member
UID 110072
Gender Male
Status Offline
I've seen someone make a script to download all articles of a blog. It's done by downloading the main page, then analyzing the links in it (like links to the next article, next page, etc., extracting related links), and then downloading further, in a cyclical manner.

[ Last edited by 523066680 on 2010-3-16 at 13:44 ]
Floor 11 Posted 2010-03-16 21:33 ·  中国 河南 新乡 电信
初级用户
★★
Credits 96
Posts 83
Joined 2009-06-04 00:54
17-year member
UID 146648
Gender Male
From 信阳
Status Offline
Moderator, can I search the entire site to download software? I don't know which one is easy to use? I just want to download the web pages of this forum. Moderator, give me a method? Urgent!

[ Last edited by 740011611 on 2010-3-19 at 18:34 ]
Floor 12 Posted 2010-03-16 21:50 ·  中国 陕西 西安 电信
银牌会员
★★★★
钻石会员
Credits 2,278
Posts 1,020
Joined 2007-11-19 13:34
18-year member
UID 103127
Gender Male
Status Offline
There is a green full-site download tool in my cloud disk (the one in my signature), which is the pro.rar in the C:\soft directory. It is relatively easy to use (not command-line). It comes with a keygen. After registration, you can download without restrictions.

Click on the file, the New Project Wizard, and then select the second option - Copy a website, including the directory structure of the website, and you can mirror a website.

=====================================================
Let me interject, you can all fire at me:

There are many software for downloading full sites online, but for a novice to use it well, it takes a process. Everyone can use search, but to master a professional software, one must understand some professional knowledge. Those wge, curl online should all be relatively powerful tools. I ask, how many experts in the forum say they have mastered them well? If you just tell a novice to use Google at every turn, it seems this problem is too simple. I ask, is our forum just for people to learn how to search?

The union has relatively few discussion threads about full-site download or wget, curl usage, and the only existing threads also stay at a very shallow depth.

======================================================

Originally posted by 740011611 at 2010-3-14 07:37 PM:
I don't know if Wget can achieve the goal of downloading the entire site?
wget -r -p -np -E -k http://www.cn-dos.net/forum/

I found that many web pages are downloaded repeatedly, what should I do?


When I use wget to download the entire site, I use a parameter

wget -m www.cn-dos.net/forum


You can give it a try

[ Last edited by plp626 on 2010-3-17 at 09:22 ]
山外有山,人外有人;低调做人,努力做事。

进入网盘(各种工具)~~ 空间~~cmd学习
Floor 13 Posted 2010-03-19 20:56 ·  中国 河南 新乡 电信
初级用户
★★
Credits 96
Posts 83
Joined 2009-06-04 00:54
17-year member
UID 146648
Gender Male
From 信阳
Status Offline
I really appreciate your selfless help and tireless explanations! They have created a very good learning environment for us novices. Wish the DOS Union better and better!

Back to the topic: I used wget -m http://www.cn-dos/forum to download mostly duplicate files (note that they are not in web page format! It's not easy to take a screenshot here, so I didn't upload it to you!)
Finally, I still had to use for /f "delims=" %i in ('dir /a /b') do ren "%i" "%i.html" to rename.
But there are still many useless web pages. Do I still have to delete them one by one? Is there a better way?

Saw a post like this:
@echo off

::Download the essence index post
cd.>essence.txt
wget -q -O essence.txt "http://www.cn-dos.net/forum/viewthread.php?tid=27667"

::Set the file save directory here
set downdir=cn-dos forum essence posts
md %downdir%
echo\is downloading... Please wait...

::Batch download posts to the newly created directory
for /f %%a in ('sed -n "s/^\*\)}.*$/\1/p" essence.txt') do (
wget -q -O %downdir%\%%a.html "http://www.cn-dos.net/forum/viewthread.php?tid=%%a&action=printable"
)

::Download completed, open the directory
echo Download completed
ping -n 3 127.0.0.1 >nul&&start %downdir%



This download is very good. I don't know if it can be used here? Please trouble the experts to take a look.
Floor 14 Posted 2010-03-19 20:59 ·  中国 辽宁 沈阳 电信
版主
★★
Credits 709
Posts 287
Joined 2010-01-13 12:05
16-year member
UID 158583
Gender Female
From 尖竹汶府
Status Offline
You search for "Network Sniffer", but unfortunately the next post is a bit slow, all in HTML format.
Floor 15 Posted 2010-03-20 14:59 ·  中国 北京 联通
高级用户
★★★
据说是李先生
Credits 609
Posts 400
Joined 2008-04-23 15:55
18-year member
UID 116706
Gender Male
Status Offline
If you pay attention usually, you will find that the addresses of the posts are all like this (the following few parameters are not important)

http://www.cn-dos.net/forum/viewthread.php?tid=Post number

Just enter it directly to enter a post, and fortunately, this number seems to increase in the way of natural numbers. Now it is almost 50574. If you add a parameter &action=printable, then a printable version will come out, that is, a page containing only the basic post content, which is the one you mentioned in building 13. You can probably choose a number to start and cycle to download.

But this method is extremely not recommended because the post name cannot be obtained, it is not known which section it is in, and it is not known which numbers are not available (some posts have been deleted)
┏━━━━━━┓
┃据说是李先生┃
┠──────┨
┃*ntRSS┃
┗━━━━━━┛
Forum Jump: