pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/EuroPython/programapi/commit/2356b33d4f89b3a49bec138888812ed9c026e57d

rigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-7a1ad343bd40328c.css" /> No headers for request to p/youtube · EuroPython/programapi@2356b33 · GitHub
Skip to content

Commit 2356b33

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

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy