relax replace url
This commit is contained in:
parent
c4816ef472
commit
4a6a052b5c
9
livie.py
9
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user