Skip to content

Commit 381ac87

Browse files
committed
No headers for request to p/youtube
1 parent a4af792 commit 381ac87

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
@@ -36,7 +36,11 @@
3636
while url := data["next"]:
3737
n += 1
3838
pbar.update(1)
39-
response = requests.get(url, headers=headers)
39+
response = (
40+
requests.get(url)
41+
if resource_name == "youtube"
42+
else requests.get(url, headers=headers)
43+
)
4044

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

0 commit comments

Comments
 (0)