Note that there are some explanatory texts on larger screens.

plurals
  1. PORuby list files in remote http server
    primarykey
    data
    text
    <p>I have a files listing page on a remote server, say <code>http://myserver.com/uploads</code>. How can I get the list of files using Ruby, preferably with net-http only?</p> <p>This is the HTML code of the page:</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"&gt; &lt;!-- saved from url=(0025)http://myserver.com/uploads/ --&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt; &lt;title&gt;Index of /uploads&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;h1&gt;Index of /uploads&lt;/h1&gt; &lt;table&gt; &lt;tbody&gt; &lt;tr&gt; &lt;th&gt;&lt;img src="./Index of uploads_files/blank.gif" alt="[ICO]"&gt;&lt;/th&gt; &lt;th&gt;&lt;a href="http://myserver.com/uploads/?C=N;O=D"&gt;Name&lt;/a&gt;&lt;/th&gt; &lt;th&gt;&lt;a href="http://myserver.com/uploads/?C=M;O=A"&gt;Last modified&lt;/a&gt;&lt;/th&gt; &lt;th&gt;&lt;a href="http://myserver.com/uploads/?C=S;O=A"&gt;Size&lt;/a&gt;&lt;/th&gt; &lt;th&gt;&lt;a href="http://myserver.com/uploads/?C=D;O=A"&gt;Description&lt;/a&gt;&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th colspan="5"&gt;&lt;hr&gt;&lt;/th&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;&lt;img src="./Index of uploads_files/back.gif" alt="[DIR]"&gt;&lt;/td&gt; &lt;td&gt;&lt;a href="http://myserver.com/"&gt;Parent Directory&lt;/a&gt;&lt;/td&gt; &lt;td&gt;&amp;nbsp;&lt;/td&gt; &lt;td align="right"&gt; - &lt;/td&gt; &lt;td&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td valign="top"&gt;&lt;img src="./Index of uploads_files/compressed.gif" alt="[ ]"&gt;&lt;/td&gt; &lt;td&gt;&lt;a href="http://myserver.com/uploads/Backup_201305281256.tar.gz"&gt;Backup_201305281256.tar.gz&lt;/a&gt;&lt;/td&gt; &lt;td align="right"&gt;28-May-2013 18:00 &lt;/td&gt; &lt;td align="right"&gt; 13M&lt;/td&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;&lt;th colspan="5"&gt;&lt;hr&gt;&lt;/th&gt;&lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;address&gt;Apache/2.2.22 (Ubuntu) Server at myserver.com Port 80&lt;/address&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload