HoloArchivists / twspace-dl

A python module to download twitter spaces.
GNU General Public License v2.0
473 stars 78 forks source link

bug: script fails if there is a tmp file in directory #20

Closed SophiaH67 closed 2 years ago

SophiaH67 commented 2 years ago

Describe your issue

When I run the script in a folder with a file named tmp. The script fails with logs attached to this issue

Reproduction steps

  1. Follow setup steps like normal
  2. Before running the script, run touch tmp
  3. The script now crashes and does not download the space

Potential fixes

Tempfile or something equivalent

eggplants commented 2 years ago
import tempfile
f = tempfile.TemporaryDirectory()
f.name # tempdir path
f.cleanup() # delete tempdir
Ryu1845 commented 2 years ago

I'll fix that either tomorrow or this weekend, thanks for your inputs