class_docstr: Youtube Video info  by video id Table implementation
class_docstr_tok: ["Youtube","Video","info","by","video","id","Table","implementation"]
code: def get_videos_by_video_ids(self, video_ids):
      data = []
  
      if not isinstance(video_ids, list):
          logger.error(
              f"video_ids must be a list. Received {type(video_ids)} instead."
          )
          return pd.DataFrame()
  
      # loop over 50 video ids at a time
      # an invalid request error is caused otherwise
      for i in range(0, len(video_ids), 50):
          resource = (
              self.handler.connect()
              .videos()
              .list(
                  part="statistics,snippet,contentDetails",
                  id=",".join(video_ids[i : i + 50]),
              )
              .execute()
          )
          for item in resource["items"]:
              data.append(
                  {
                      "channel_id": item["snippet"]["channelId"],
                      "channel_title": item["snippet"]["channelTitle"],
                      "comment_count": item["statistics"][
                          "commentCount"
                      ],
                      "description": item["snippet"]["description"],
                      "like_count": item["statistics"]["likeCount"],
                      "publish_time": item["snippet"]["publishedAt"],
                      "title": item["snippet"]["title"],
                      "transcript": self.get_captions_by_video_id(
                          item["id"]
                      ),
                      "video_id": item["id"],
                      "view_count": item["statistics"]["viewCount"],
                      "duration_str": self.parse_duration(
                          item["id"], item["contentDetails"]["duration"]
                      ),
                  }
              )
  
      return pd.json_normalize(data)
  
imports: from typing import List
  from mindsdb.integrations.libs.api_handler import APITable
  from mindsdb.integrations.utilities.sql_utils import extract_comparison_conditions
  from mindsdb.utilities import log
  from mindsdb_sql.parser import ast
  from mindsdb.integrations.handlers.utilities.query_utilities import SELECTQueryParser, SELECTQueryExecutor, INSERTQueryParser
  import pandas
  import re
  from youtube_transcript_api import YouTubeTranscriptApi
  from youtube_transcript_api.formatters import JSONFormatter
label_desc: Use image node_id 3 for calling the YoutubeVideosTable obj's underlying member method code with example usage: obj.get_videos_by_video_ids(video_ids) and returns: pd, pd