aboutsummaryrefslogtreecommitdiffstats
path: root/livie.py
diff options
context:
space:
mode:
Diffstat (limited to 'livie.py')
-rw-r--r--livie.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/livie.py b/livie.py
index 5b5028a..4abddda 100644
--- a/livie.py
+++ b/livie.py
@@ -20,9 +20,16 @@ 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 = URL + vid.h3.a['href']
+ link = urlFreedom(URL + vid.h3.a['href'])
title = vid.h3.a.text
description = vid.h3.span.text
author = vid.find(class_='yt-lockup-byline').a.text