```py video_ids = [] q = Queue() # ydl using extract_flat: True q.put(ydl.extract_info(channel_url)) while not q.empty(): info = q.get() if info['_type'] == 'url': if info.get('ie_key') == 'Youtube': video_ids.append(info['id']) else: q.put(ydl.extract_info(info['url'])) elif info['_type'] == 'playlist': for entry in info['entries']: q.put(entry) print(len(video_ids)) ```