2. The method according to claim 1 , further comprising displaying to a user a list of videos from which code segments being associated with highest ranks have been extracted.
1. A method for providing a video in response to a query, the method comprising using at least one hardware processor for: receiving a multiplicity of videos from a source; for each video: receiving meta data related to the video; extracting from the video a video frame containing computer code; identifying a region of interest (ROI) within the video frame; performing optical character recognition (OCR) of the ROI to extract a code segment; analyzing the code segment, said analyzing comprising: (a) semantically analyzing the code segment to obtain a first rank, (b) structurally analyzing the code segment to obtain a second rank, and (c) analyzing the meta data to obtain a third rank; and combining the first rank, second rank and third rank into a total rank associated with the code segment; receiving a query; matching the query to each code segment to identify matching code segments and associated videos; and providing the associated videos in accordance with total ranks associated with the matching code segments.