如何列出远程URL(非本地)下的所有文件? [英] How to list all files under a remote url(not local)?

查看:122
本文介绍了如何列出远程URL(非本地)下的所有文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我想遍历所有文件并在URL下下载它们.例如

网址:http://www.okokok.com//d/418/

因此文件可能是
http://www.okokok.com//d/418/6-7.jpg或http://www.okokok.com//d/418/15.png等.


我所能找到的就是如何遍历本地文件夹下的文件. -_-;
但是没有人描述我想要什么...

ps:谢谢大家.

我需要澄清的一点是我不是网站管理员.
该程序的目的是我希望在此网站上看到卡通片,因此该程序将从该网站上获取图像.
对于那些卡通图像,它们都位于不同的页面上.一页包含1张有用的卡通图像,以及其他无用的图像.

您不能使用Spider,因为此页面上没有下一个卡通图片的网址.

这是网站网址:http://www.narutom.com/comic/8809.html?p = 6

因此,您可以查看其中的内容.
而卡通图片网址在名为:tbComic
的表中
希望我提到的内容有用.

再次感谢您.

Hi there,

I want to iterate all files and download them under a url. For example

url : http://www.okokok.com//d/418/

so the files might be
http://www.okokok.com//d/418/6-7.jpg or http://www.okokok.com//d/418/15.png etc..


All I can find are how to iterate files under a local folder. -_-;
But no one describes what I want......

ps: thanks guys.

Something that I have to clarify that I am not the web site administrator.
The aim of program is that I want to see the Cartoon on this website.So this program will get images from that web site.
And for those cartoon images, they are all on the different pages. One page contains 1 useful cartoon image,and other useless images as well.

You can not use spider, because there is not the url for the next Cartoon image on this page.

This is the web site url :http://www.narutom.com/comic/8809.html?p=6

So you can have a look what''s in it.
And Cartoon Image url is in the table called :tbComic

Hopefully, what I mentioned is useful.

Thanks again

推荐答案

您不能,除非网站管理员授予您浏览权限. (不太可能)您可以抓取"该网站,即跟踪页面上的所有链接,然后对其进行迭代.
如果您具有对站点的ftp访问权限,则可以遵循其目录结构(不太可能).
如果站点响应WebDav,则可以将其映射到资源管理器中(甚至不太可能)
You can''t, except if the web site administrator gives you browse permission. (not likely) You could ''crawl'' the site, i.e. follow all the links on a page, and iterate this.
If you have ftp access to site, you can follow it''s directory structure (not likely).
If the site responds to WebDav, you could map it in explorer (even not likelier)


这是由Web服务器处理的,据我所知,没有方法可以覆盖服务器已配置访问权限.

如果要更改所管理网站的默认行为,则需要查阅服务器软件手册.在许多情况下,您可以通过以下方法来做到这一点:全局关闭默认内容页面(如果您正在运行IIS,请拉起管理控制台,右键单击网站节点,选择属性,然后转到文档"标签,然后取消选中"启用默认内容页面"),或通过从要浏览的文件夹中删除默认页面(例如default.aspxindex.html)
That is handled by the web server and, to my knowledge, there is no way to override the way the server has configured access.

If you want to change the default behavior of a website you manage, you will need to consult the manual for your server software. In many cases, you can do this by either globally turning off default content pages (if you are running IIS, pull up the management console, right click on the website node, select Properties, go to the Documents tab and uncheck Enable default content page) or by removing default pages such as default.aspx and index.html from the folders that you want to be browsable.


ding ~~~~
还有其他想法吗?

谢谢

????
ding~~~~
Is anyone has other idea?

thanks

????


这篇关于如何列出远程URL(非本地)下的所有文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆