Skip to content

Commit

Permalink
Merge pull request #12 from sylvqin/master
Browse files Browse the repository at this point in the history
Disabled "uxe" condition
  • Loading branch information
dermasmid authored Aug 24, 2022
2 parents 0a6c088 + 45b3147 commit 1803766
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions scrapetube/scrapetube.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,8 @@ def get_videos(


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

html = response.text
return html
Expand Down

0 comments on commit 1803766

Please sign in to comment.