changed URL parsing to use urllib

This commit is contained in:
Tristan Lee
2022-03-01 14:13:04 -06:00
parent ee4d64750b
commit f3d9dc91c6
4 changed files with 10 additions and 8 deletions

View File

@@ -9,7 +9,8 @@ import tempfile
import requests
from bs4 import BeautifulSoup
import youtube_dl
import json
import json
from urllib.parse import urlparse
BASE_URL = 'https://rumble.com'
@@ -82,7 +83,7 @@ class RumbleScraper(cisticola.scraper.base.Scraper):
blob = f.read()
if key is None:
key = url.split('/')[-2] + ext
key = urlparse(url).path.split('/')[-2] + ext
return blob, content_type, key