Skip to content

Commit 2356b33

Browse files
committed
No headers for request to p/youtube
1 parent def9098 commit 2356b33

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/download.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@
5656
while url := data["next"]:
5757
n += 1
5858
pbar.update(1)
59-
response = requests.get(url, headers=headers)
59+
response = (
60+
requests.get(url)
61+
if resource_name == "youtube"
62+
else requests.get(url, headers=headers)
63+
)
6064

6165
if response.status_code != 200:
6266
raise Exception(f"Error {response.status_code}: {response.text}")

0 commit comments

Comments
 (0)