diff options
author | Jesús <heckyel@hyperbola.info> | 2019-12-04 15:30:02 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2019-12-04 15:30:02 -0500 |
commit | 4a6a052b5c97cc286f198886003281ee9be0aaef (patch) | |
tree | 4ce607d75a0482ffc0553279ea929d58294c7041 | |
parent | c4816ef4724bb4b7d614ef4e3cf9ac0fcf6aa7db (diff) | |
download | livie-4a6a052b5c97cc286f198886003281ee9be0aaef.tar.lz livie-4a6a052b5c97cc286f198886003281ee9be0aaef.tar.xz livie-4a6a052b5c97cc286f198886003281ee9be0aaef.zip |
relax replace url
-rw-r--r-- | livie.py | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -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 |