Twixes
commited on
Format with Black
Browse files- pytube/request.py +3 -1
pytube/request.py
CHANGED
@@ -9,7 +9,9 @@ from urllib.request import urlopen
|
|
9 |
def _execute_request(url: str) -> Any:
|
10 |
if not url.lower().startswith("http"):
|
11 |
raise ValueError
|
12 |
-
return urlopen(
|
|
|
|
|
13 |
|
14 |
|
15 |
def get(url) -> str:
|
|
|
9 |
def _execute_request(url: str) -> Any:
|
10 |
if not url.lower().startswith("http"):
|
11 |
raise ValueError
|
12 |
+
return urlopen(
|
13 |
+
Request(url, headers={"User-Agent": "Mozilla/5.0", "Range": "bytes=0-"})
|
14 |
+
) # nosec
|
15 |
|
16 |
|
17 |
def get(url) -> str:
|