Thanks. And yes, will do of course.Norbert wrote: ↑September 17th, 2020, 3:45 pmDefinitely.
viewtopic.php?f=67&t=4595
Will you announce it on Facebook?
[Edit: Posted on FB here].
Also, is there any way for the administrator to email everybody on this forum about this? There are some people are not regular visitors, but would definitely participate in this. If we get lot of participants, then that's an interesting thing.
Thanks. Recently, I had written a Python script (for fun) which fetches all the tricks from PoPOT. I just loved it to have all the tricks downloaded into popot-tricks directory. I wanted to share it somewhere, so I am sharing it here:
Code: Select all
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import requests
import os
import sys
START = 1
END = 1
if sys.argv[1] is not None:
END = int(sys.argv[1])
print(f'Will start at {START} and end at {END}...')
OUTPUT_DIR = "popot-tricks"
OUTPUT_FINAL_DIR = os.path.join(os.getcwd(), OUTPUT_DIR)
if not os.path.exists(OUTPUT_FINAL_DIR):
os.makedirs(OUTPUT_FINAL_DIR)
print(f"{OUTPUT_FINAL_DIR} didn't existed. Created now!")
# https://www.popot.org/documentation/videos/trick_00001.ogv ==> Sample URL
URL = "https://www.popot.org/documentation/videos/trick_{}.ogv"
DOWNLOAD_VIDEO_EXTENSION = ".ogv"
for x in range(START, END + 1):
trick_number = str(x).rjust(5, "0")
print(f"Working on trick: {trick_number}")
trick_url = URL.format(trick_number)
# Check if trick exists
trick_path = os.path.join(OUTPUT_FINAL_DIR, str(trick_number) + str(DOWNLOAD_VIDEO_EXTENSION))
if os.path.exists(trick_path):
print(f"{trick_number} trick already exists... Continuing...")
else:
try:
r = requests.get(trick_url, stream = True)
with open(trick_path, "wb") as f:
for chunk in r.iter_content(chunk_size = 1024):
f.write(chunk)
print(f"Finished working on: {trick_number}")
except Exception as e:
print(f"{trick_number} trick couldn't be downloaded. Try again later! {e}")
Code: Select all
python3 filename.py 151
