mirror of
https://github.com/dataforcanada/d4c-datapkg-statistical.git
synced 2026-06-13 14:10:55 +02:00
Create torrent of a dataset. Has HTTP seed URLs that work (when created through py3createtorrent). I am able to max out my internet connection when downloading the torrent.
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,76 @@
|
|||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "add9fae2-a445-4a97-9705-bc5c399fb3b5",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"# The HTTP seeding URLs are not included in the torrent when I open it up with qBittorrent"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 1,
|
||||||
|
"id": "175125b4-f8c3-4072-970d-5c4ca17e47e4",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"from torf import Torrent\n",
|
||||||
|
"\n",
|
||||||
|
"data_folder = \"/data/canvec\"\n",
|
||||||
|
"filename = f\"{data_folder}/canvec_50K_QC_Hydro_fgdb.zip\"\n",
|
||||||
|
"trackers = [\"https://tracker.yemekyedim.com:443/announce\", \n",
|
||||||
|
" \"udp://tracker.opentrackr.org:1337/announce\"]\n",
|
||||||
|
"httpseeds = [\"https://data-02.dataforcanada.org/archive/natural_resources_canada/hydro/2019/canvec_50K_QC_Hydro_fgdb.zip\",\n",
|
||||||
|
" \"https://archive.org/download/canvec-hydro-50k-2019-07-24/canvec_50K_QC_Hydro_fgdb.zip\",\n",
|
||||||
|
" \"https://zenodo.org/records/15350060/files/canvec_50K_QC_Hydro_fgdb.zip?download=1\"\n",
|
||||||
|
" ]"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 6,
|
||||||
|
"id": "bd43692b-12d8-496c-a869-8d93171e3c88",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"t = Torrent(path=filename,\n",
|
||||||
|
" trackers=trackers,\n",
|
||||||
|
" httpseeds=httpseeds,\n",
|
||||||
|
" private=True)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 7,
|
||||||
|
"id": "a106687c-5fcb-4c43-8e35-c2736443e902",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"t.generate()\n",
|
||||||
|
"t.write(\"testing-canvec_50K_QC_Hydro_fgdb.zip.torrent\", overwrite=True)"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"kernelspec": {
|
||||||
|
"display_name": "Python 3 (ipykernel)",
|
||||||
|
"language": "python",
|
||||||
|
"name": "python3"
|
||||||
|
},
|
||||||
|
"language_info": {
|
||||||
|
"codemirror_mode": {
|
||||||
|
"name": "ipython",
|
||||||
|
"version": 3
|
||||||
|
},
|
||||||
|
"file_extension": ".py",
|
||||||
|
"mimetype": "text/x-python",
|
||||||
|
"name": "python",
|
||||||
|
"nbconvert_exporter": "python",
|
||||||
|
"pygments_lexer": "ipython3",
|
||||||
|
"version": "3.12.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 5
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 1,
|
||||||
|
"id": "4ad35784-72f1-4da1-8310-bdc701b3bf57",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "stdout",
|
||||||
|
"output_type": "stream",
|
||||||
|
"text": [
|
||||||
|
"Successfully created torrent:\n",
|
||||||
|
" Name: canvec_50K_QC_Hydro_fgdb.zip\n",
|
||||||
|
" Size: 3212.87 MiB\n",
|
||||||
|
" Pieces: 1607 x 2048 KiB\n",
|
||||||
|
" Comment: created with py3createtorrent v1.2.1\n",
|
||||||
|
" Private: no\n",
|
||||||
|
" Creation date: 2025-06-27 16:05:37\n",
|
||||||
|
" DHT bootstrap nodes: (none)\n",
|
||||||
|
" Webseeds: ['https://data-02.dataforcanada.org/archive/natural_resources_canada/hydro/2019/canvec_50K_QC_Hydro_fgdb.zip', 'https://archive.org/download/canvec-hydro-50k-2019-07-24/canvec_50K_QC_Hydro_fgdb.zip', 'https://zenodo.org/records/15350060/files/canvec_50K_QC_Hydro_fgdb.zip?download=1']\n",
|
||||||
|
" Primary tracker: https://tracker.yemekyedim.com:443/announce\n",
|
||||||
|
" Backup trackers:\n",
|
||||||
|
" udp://tracker.opentrackr.org:1337/announce\n"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"py3createtorrent --tracker \"https://tracker.yemekyedim.com:443/announce\" \\\n",
|
||||||
|
" --tracker \"udp://tracker.opentrackr.org:1337/announce\" \\\n",
|
||||||
|
" --webseed \"https://data-02.dataforcanada.org/archive/natural_resources_canada/hydro/2019/canvec_50K_QC_Hydro_fgdb.zip\" \\\n",
|
||||||
|
" --webseed \"https://archive.org/download/canvec-hydro-50k-2019-07-24/canvec_50K_QC_Hydro_fgdb.zip\" \\\n",
|
||||||
|
" --webseed \"https://zenodo.org/records/15350060/files/canvec_50K_QC_Hydro_fgdb.zip?download=1\" \\\n",
|
||||||
|
" /data/canvec/canvec_50K_QC_Hydro_fgdb.zip \\\n",
|
||||||
|
" --output canvec_50K_QC_Hydro_fgdb.zip.torrent \\\n",
|
||||||
|
" --force"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "213373da-ecb0-468a-9ab8-79d7cad42f2c",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"py3createtorrent --tracker \"https://tracker.yemekyedim.com:443/announce\" \\\n",
|
||||||
|
" --tracker \"udp://tracker.opentrackr.org:1337/announce\" \\\n",
|
||||||
|
" --webseed \"https://data-02.dataforcanada.org/archive/s2maps/2023/s2maps-sentinel2-2023.pmtiles\" \\\n",
|
||||||
|
" s2maps-sentinel2-2023.pmtiles \\\n",
|
||||||
|
" --output s2maps-sentinel2-2023.pmtiles.torrent \\\n",
|
||||||
|
" --force"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"kernelspec": {
|
||||||
|
"display_name": "Bash",
|
||||||
|
"language": "bash",
|
||||||
|
"name": "bash"
|
||||||
|
},
|
||||||
|
"language_info": {
|
||||||
|
"codemirror_mode": "shell",
|
||||||
|
"file_extension": ".sh",
|
||||||
|
"mimetype": "text/x-sh",
|
||||||
|
"name": "bash"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 5
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user