Upload wget_Example.ipynb
Browse files- wget_Example.ipynb +98 -0
wget_Example.ipynb
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"nbformat": 4,
|
3 |
+
"nbformat_minor": 0,
|
4 |
+
"metadata": {
|
5 |
+
"colab": {
|
6 |
+
"provenance": []
|
7 |
+
},
|
8 |
+
"kernelspec": {
|
9 |
+
"name": "python3",
|
10 |
+
"display_name": "Python 3"
|
11 |
+
},
|
12 |
+
"language_info": {
|
13 |
+
"name": "python"
|
14 |
+
}
|
15 |
+
},
|
16 |
+
"cells": [
|
17 |
+
{
|
18 |
+
"cell_type": "markdown",
|
19 |
+
"source": [
|
20 |
+
"You can configure the wget command here : https://www.whatismybrowser.com/developers/tools/wget-wizard/\n",
|
21 |
+
"\n",
|
22 |
+
"Example on how to use the wget command.\n",
|
23 |
+
"\n"
|
24 |
+
],
|
25 |
+
"metadata": {
|
26 |
+
"id": "tdZhsxGmo6dq"
|
27 |
+
}
|
28 |
+
},
|
29 |
+
{
|
30 |
+
"cell_type": "code",
|
31 |
+
"execution_count": null,
|
32 |
+
"metadata": {
|
33 |
+
"id": "4sW9MbJVo4Qk"
|
34 |
+
},
|
35 |
+
"outputs": [],
|
36 |
+
"source": [
|
37 |
+
"#Initialize\n",
|
38 |
+
"import os\n",
|
39 |
+
"def my_mkdirs(folder):\n",
|
40 |
+
" if os.path.exists(folder)==False:\n",
|
41 |
+
" os.makedirs(folder)\n",
|
42 |
+
"\n",
|
43 |
+
"#Mount Google drive\n",
|
44 |
+
"from google.colab import drive\n",
|
45 |
+
"drive.mount('/content/drive')"
|
46 |
+
]
|
47 |
+
},
|
48 |
+
{
|
49 |
+
"cell_type": "code",
|
50 |
+
"source": [
|
51 |
+
"#Download the audio to Googles server\n",
|
52 |
+
"%cd /content/\n",
|
53 |
+
"my_mkdirs(\"AudiosP1\")\n",
|
54 |
+
"%cd AudiosP33\n",
|
55 |
+
"!wget \"http://miya.nipah.moe:81/public/music/Concerto%20Moon%20(1997)%20-%20Fragments%20of%20the%20Moon%20%5bLMP%200004-015%20CD%5d%5bFLAC%5d/\" -R mp4 -nc -w 2 -r -nH --cut-dirs=2 -np -R \"index.html*\" -R \".DS_Store,Thumbs.db,thumbcache.db,desktop.ini,_macosx\"\n",
|
56 |
+
"!wget \"http://miya.nipah.moe:81/public/music/Sunny%20Lax%20-%20Sheeverz%20_%20Alliance%20-%20(2019)%20%7bWEB%20-%20FLAC%7d/\" -R mp4 -nc -w 2 -r -nH --cut-dirs=2 -np -R \"index.html*\" -R \".DS_Store,Thumbs.db,thumbcache.db,desktop.ini,_macosx\"\n",
|
57 |
+
"!wget \"http://miya.nipah.moe:81/public/music/2014%20-%20Casualties%20of%20Cool%20(HevyDevy%20Records%20HD2-CD-5717)/\" -R mp4 -nc -w 2 -r -nH --cut-dirs=2 -np -R \"index.html*\" -R \".DS_Store,Thumbs.db,thumbcache.db,desktop.ini,_macosx\"\n",
|
58 |
+
"!wget \"http://miya.nipah.moe:81/public/music/%e4%ba%9c%e8%98%ad%e7%9f%a5%e5%ad%90%20-%20More%20Relax/\" -R mp4 -nc -w 2 -r -nH --cut-dirs=2 -np -R \"index.html*\" -R \".DS_Store,Thumbs.db,thumbcache.db,desktop.ini,_macosx\"\n",
|
59 |
+
"!wget \"http://miya.nipah.moe:81/public/music/1977%20-%20%20Harbor%20(WB,%201999,%207599-26883-2)%20FLAC/\" -R mp4 -nc -w 2 -r -nH --cut-dirs=2 -np -R \"index.html*\" -R \".DS_Store,Thumbs.db,thumbcache.db,desktop.ini,_macosx\"\n",
|
60 |
+
"!wget \"http://miya.nipah.moe:81/public/music/Citla%20Re_%20Verse%20(%e5%85%b6%e6%ad%8c%e3%81%af%e5%8e%9f%e5%88%9d%e3%81%ae%e8%a8%98%e6%86%b6%e3%81%a8%e7%82%ba%e3%82%8a%e3%81%a6)/\" -R mp4 -nc -w 2 -r -nH --cut-dirs=2 -np -R \"index.html*\" -R \".DS_Store,Thumbs.db,thumbcache.db,desktop.ini,_macosx\"\n",
|
61 |
+
"!wget \"http://miya.nipah.moe:81/public/music/LEAH%20-%20Kings%20&%20Queens%20FLAC/\" -R mp4 -nc -w 2 -r -nH --cut-dirs=2 -np -R \"index.html*\" -R \".DS_Store,Thumbs.db,thumbcache.db,desktop.ini,_macosx\"\n",
|
62 |
+
"!wget \"http://miya.nipah.moe:81/public/music/Compllege%20-%20Phant%202%20(2017)%20%5bCOCD-0011%5d%20%5bFLAC%5d/\" -R mp4 -nc -w 2 -r -nH --cut-dirs=2 -np -R \"index.html*\" -R \".DS_Store,Thumbs.db,thumbcache.db,desktop.ini,_macosx\""
|
63 |
+
],
|
64 |
+
"metadata": {
|
65 |
+
"id": "iTFNa8UjqFUU"
|
66 |
+
},
|
67 |
+
"execution_count": null,
|
68 |
+
"outputs": []
|
69 |
+
},
|
70 |
+
{
|
71 |
+
"cell_type": "code",
|
72 |
+
"source": [
|
73 |
+
"#Put the content in a .zip file and save that .zip file on your Google account\n",
|
74 |
+
"%cd /content/\n",
|
75 |
+
"!zip -r /content/drive/MyDrive/AudiosP1.zip /content/AudiosP1"
|
76 |
+
],
|
77 |
+
"metadata": {
|
78 |
+
"id": "8bUS2ISjrgaW"
|
79 |
+
},
|
80 |
+
"execution_count": null,
|
81 |
+
"outputs": []
|
82 |
+
},
|
83 |
+
{
|
84 |
+
"cell_type": "code",
|
85 |
+
"source": [
|
86 |
+
"#Delete the folder (as a safeguard, this will not work unless you manually change the name of the folder first)\n",
|
87 |
+
"%cd /content/\n",
|
88 |
+
"import shutil\n",
|
89 |
+
"shutil.rmtree(\"/content/xxx-AudiosP1\")"
|
90 |
+
],
|
91 |
+
"metadata": {
|
92 |
+
"id": "r0JxiJyHqmMR"
|
93 |
+
},
|
94 |
+
"execution_count": null,
|
95 |
+
"outputs": []
|
96 |
+
}
|
97 |
+
]
|
98 |
+
}
|