mirror of
https://github.com/dataforcanada/d4c-datapkg-statistical.git
synced 2026-06-13 14:10:55 +02:00
77 lines
2.0 KiB
Plaintext
77 lines
2.0 KiB
Plaintext
{
|
|
"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
|
|
}
|