From 4a6a052b5c97cc286f198886003281ee9be0aaef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Wed, 4 Dec 2019 15:30:02 -0500 Subject: [PATCH] relax replace url --- livie.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/livie.py b/livie.py index 4abddda..0fcc57c 100644 --- a/livie.py +++ b/livie.py @@ -20,16 +20,9 @@ def replace(string): string = string.replace(' views', '') return string -def urlFreedom(string): - """Replace to URL freedom""" - string = string.replace( - 'https://www.youtube.com', - 'https://invidio.us') - return string - for vid in SOUP.find_all(class_='yt-lockup-content'): try: - link = urlFreedom(URL + vid.h3.a['href']) + link = 'https://invidio.us' + vid.h3.a['href'] title = vid.h3.a.text description = vid.h3.span.text author = vid.find(class_='yt-lockup-byline').a.text