From 56d688299b9df4eacdd37e35b2e5d79452164f40 Mon Sep 17 00:00:00 2001 From: Ritiek Malhotra Date: Fri, 13 Jan 2017 10:28:50 +0530 Subject: [PATCH] ignore google ads --- spotdl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spotdl.py b/spotdl.py index 07d4c44..ffac38e 100644 --- a/spotdl.py +++ b/spotdl.py @@ -23,7 +23,7 @@ def searchYT(number): items_parse = BeautifulSoup(items, "html.parser") first_result = items_parse.find_all(attrs={'class':'yt-uix-tile-link'})[0]['href'] check = 1 - while not first_result.find('channel') == -1: + while not first_result.find('channel') == -1 or first_result.find('googleads') == -1: first_result = items_parse.find_all(attrs={'class':'yt-uix-tile-link'})[check]['href'] check += 1 del check