BASC-Archiver
BASC-Archiver copied to clipboard
Add `file_count()` method in py4chan
In fourchan.py
, there happen to be these notes in line 246:
# TODO: extend BASC-py4chan to give us this number directly
self.threads[thread_id]['total_files'] = len(list(thread['thread'].filenames()))
And line 255:
# TODO: extend BASC-py4chan to give us this number directly
self.threads[thread_id]['total_files'] = len(list(running_thread.filenames()))
Apparently, it might be a good idea to have a file_count()
method in basc_py4chan.Thread
that counts the amount of replies where has_file
returns True
.