Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP Error 403: Forbidden #3

Open
Rubiooo04 opened this issue Feb 2, 2025 · 0 comments
Open

HTTP Error 403: Forbidden #3

Rubiooo04 opened this issue Feb 2, 2025 · 0 comments

Comments

@Rubiooo04
Copy link

Hello!

I'm trying to run the script but with any link I get this error

python clips_extractor.py --url https://www.youtube.com/watch?v=qgOsZ52zk5Q
Traceback (most recent call last):
  File "/home/money/viral-clips-extractor/clips_extractor.py", line 28, in <module>
    video_id, title, author = get_video(video_url, input_video)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/money/viral-clips-extractor/core/utils/youtube.py", line 8, in get_video
    video = yt.streams.filter(file_extension='mp4', progressive=True).order_by('resolution').desc().first()
            ^^^^^^^^^^
  File "/home/money/viral-clips-extractor/clips/lib/python3.11/site-packages/pytube/__main__.py", line 296, in streams
    return StreamQuery(self.fmt_streams)
                       ^^^^^^^^^^^^^^^^
  File "/home/money/viral-clips-extractor/clips/lib/python3.11/site-packages/pytube/__main__.py", line 176, in fmt_streams
    stream_manifest = extract.apply_descrambler(self.streaming_data)
                                                ^^^^^^^^^^^^^^^^^^^
  File "/home/money/viral-clips-extractor/clips/lib/python3.11/site-packages/pytube/__main__.py", line 160, in streaming_data
    self.bypass_age_gate()
  File "/home/money/viral-clips-extractor/clips/lib/python3.11/site-packages/pytube/__main__.py", line 257, in bypass_age_gate
    innertube_response = innertube.player(self.video_id)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/money/viral-clips-extractor/clips/lib/python3.11/site-packages/pytube/innertube.py", line 448, in player
    return self._call_api(endpoint, query, self.base_data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/money/viral-clips-extractor/clips/lib/python3.11/site-packages/pytube/innertube.py", line 390, in _call_api
    response = request._execute_request(
               ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/money/viral-clips-extractor/clips/lib/python3.11/site-packages/pytube/request.py", line 37, in _execute_request
    return urlopen(request, timeout=timeout)  # nosec
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/urllib/request.py", line 525, in open
    response = meth(req, response)
               ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/urllib/request.py", line 634, in http_response
    response = self.parent.error(
               ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/urllib/request.py", line 563, in error
    return self._call_chain(*args)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/urllib/request.py", line 496, in _call_chain
    result = func(*args)
             ^^^^^^^^^^^
  File "/usr/lib/python3.11/urllib/request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

I try to run it with many different links but I got the same error in all of them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant