Skip to content

Commit 1803766

Browse files
authored
Merge pull request #12 from sylvqin/master
Disabled "uxe" condition
2 parents 0a6c088 + 45b3147 commit 1803766

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

scrapetube/scrapetube.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,8 @@ def get_videos(
181181

182182

183183
def get_initial_data(session: requests.Session, url: str) -> str:
184+
session.cookies.set("CONSENT", "YES+cb", domain=".youtube.com")
184185
response = session.get(url)
185-
if "uxe=" in response.request.url:
186-
session.cookies.set("CONSENT", "YES+cb", domain=".youtube.com")
187-
response = session.get(url)
188186

189187
html = response.text
190188
return html

0 commit comments

Comments
 (0)