Search format enhancements

This commit is contained in:
Ritiek Malhotra
2020-05-10 18:52:50 +05:30
parent 819bb87fc2
commit 150d8b0b81
4 changed files with 11 additions and 15 deletions

View File

@@ -111,7 +111,7 @@ class YouTubeSearch:
def search(self, query, limit=10, retries=5):
""" Search and scrape YouTube to return a list of matching videos. """
search_url = self.generate_search_url(query)
logger.debug('Fetching YouTube results for "{}".'.format(search_url))
logger.debug('Fetching YouTube results for "{}" at "{}".'.format(query, search_url))
html = self._fetch_response_html(search_url)
videos = self._fetch_search_results(html, limit=limit)
to_retry = retries > 0 and self._is_server_side_invalid_response(videos, html)