C0D3D3V / bbb-dl

Downlaod BigBlueButton recordings. A simple scrapper for Big Blue Button lessons. Download and merge the audio and video files of a BigBlueButton conference from the conference replay url.
MIT License
68 stars 17 forks source link

Absolute path for output and working directory #58

Closed AntoineFaul closed 1 month ago

AntoineFaul commented 1 month ago

Hello, When trying to pass absolute directory for working_dir or output_dir options, the leading / is removed by the PathTools.sanitize_path, making it to resolve as a relative path.

sudo -u bot PLAYWRIGHT_BROWSERS_PATH=0 /opt/venv/bin/bbb-dl "https://example.com/playback/presentation/2.3/e019525637c5ba9215f6d9e7a9cc5d11ab08f7bf-1727697376957?meetingId=e019525637c5ba9215f6d9e7a9cc5d11ab08f7bf-1727697376957"  -f "1727706161_video.mp4" --working-dir /tmp/tmp7hhs6hgc
Error: Unable to create directory "/root/tmp/tmp7hhs6hgc" for temporary files: [Errno 13] Permission denied: '/root/tmp/tmp7hhs6hgc'
You can choose an alternative directory for the temporary files with the --working-dir option.
C0D3D3V commented 1 month ago

Good catch! PT.sanitize_path is also completely unnecessary at this point. The user is responsible for a correct path. But thanks for the hint, I think I should rewrite sanitize_path so that absolute paths can also be optionally allowed