Urllib error httperror http error 410 gone pytube

I've been getting this error on several programs for now. I've tried upgrading pytube, reinstalling it, tried some fixes, changed URLs and code, but nothing seems to work. from pytube import YouTub...

I’ve been getting this error on several programs for now.
I’ve tried upgrading pytube, reinstalling it, tried some fixes, changed URLs and code, but nothing seems to work.

from pytube import YouTube

#ask for the link from user
link = input("Enter the link of YouTube video you want to download:  ")
yt = YouTube(link)

#Showing details
print("Title: ",yt.title)
print("Number of views: ",yt.views)
print("Length of video: ",yt.length)
print("Rating of video: ",yt.rating)
#Getting the highest resolution possible
ys = yt.streams.get_highest_resolution()

#Starting download
print("Downloading...")
ys.download()
print("Download completed!!")

and this is the error code:

  File "C:UsersMadjidPycharmProjectspythonProjectapp2.py", line 6, in <module>
    yt = YouTube(link)
  File "C:UsersMadjidPycharmProjectspythonProjectvenvlibsite-packagespytube__main__.py", line 91, in __init__
    self.prefetch()
  File "C:UsersMadjidPycharmProjectspythonProjectvenvlibsite-packagespytube__main__.py", line 181, in prefetch
    self.vid_info_raw = request.get(self.vid_info_url)
  File "C:UsersMadjidPycharmProjectspythonProjectvenvlibsite-packagespytuberequest.py", line 36, in get
    return _execute_request(url).read().decode("utf-8")
  File "C:UsersMadjidPycharmProjectspythonProjectvenvlibsite-packagespytuberequest.py", line 24, in _execute_request
    return urlopen(request)  # nosec
  File "E:Pythonliburllibrequest.py", line 214, in urlopen
    return opener.open(url, data, timeout)
  File "E:Pythonliburllibrequest.py", line 523, in open
    response = meth(req, response)
  File "E:Pythonliburllibrequest.py", line 632, in http_response
    response = self.parent.error(
  File "E:Pythonliburllibrequest.py", line 555, in error
    result = self._call_chain(*args)
  File "E:Pythonliburllibrequest.py", line 494, in _call_chain
    result = func(*args)
  File "E:Pythonliburllibrequest.py", line 747, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "E:Pythonliburllibrequest.py", line 523, in open
    response = meth(req, response)
  File "E:Pythonliburllibrequest.py", line 632, in http_response
    response = self.parent.error(
  File "E:Pythonliburllibrequest.py", line 561, in error
    return self._call_chain(*args)
  File "E:Pythonliburllibrequest.py", line 494, in _call_chain
    result = func(*args)
  File "E:Pythonliburllibrequest.py", line 641, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 410: Gone

Hello. I still have the same problem. When I install pytube using:
pip3 install pytube

It gives the following error message:

  File "test.py", line 6, in <module>
    print(yt.title)
  File "/home/cfd/.local/lib/python3.7/site-packages/pytube/__main__.py", line 366, in title
    self._title = self.player_response['videoDetails']['title']
  File "/home/cfd/.local/lib/python3.7/site-packages/pytube/__main__.py", line 168, in player_response
    if isinstance(self.player_config_args["player_response"], str):
  File "/home/cfd/.local/lib/python3.7/site-packages/pytube/__main__.py", line 188, in player_config_args
    self._player_config_args = self.vid_info
  File "/home/cfd/.local/lib/python3.7/site-packages/pytube/__main__.py", line 291, in vid_info
    return dict(parse_qsl(self.vid_info_raw))
  File "/home/cfd/.local/lib/python3.7/site-packages/pytube/__main__.py", line 109, in vid_info_raw
    self._vid_info_raw = request.get(self.vid_info_url)
  File "/home/cfd/.local/lib/python3.7/site-packages/pytube/request.py", line 53, in get
    response = _execute_request(url, headers=extra_headers, timeout=timeout)
  File "/home/cfd/.local/lib/python3.7/site-packages/pytube/request.py", line 37, in _execute_request
    return urlopen(request, timeout=timeout)  # nosec
  File "/usr/lib/python3.7/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.7/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/usr/lib/python3.7/urllib/request.py", line 641, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib/python3.7/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 410: Gone

On the other hand, if I install using the command:
python3 -m pip install git+https://github.com/Zeecka/pytube@fix_1060

It returns the following different error message:

Traceback (most recent call last):
  File "/usr/lib/python3.7/urllib/request.py", line 1324, in do_open
    encode_chunked=req.has_header('Transfer-encoding'))
  File "/usr/lib/python3.7/http/client.py", line 1260, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1306, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1255, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1030, in _send_output
    self.send(msg)
  File "/usr/lib/python3.7/http/client.py", line 970, in send
    self.connect()
  File "/usr/lib/python3.7/http/client.py", line 1415, in connect
    super().connect()
  File "/usr/lib/python3.7/http/client.py", line 942, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/usr/lib/python3.7/socket.py", line 727, in create_connection
    raise err
  File "/usr/lib/python3.7/socket.py", line 716, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "test.py", line 12, in <module>
    video.download()
  File "/home/cfd/.local/lib/python3.7/site-packages/pytube/streams.py", line 255, in download
    max_retries=max_retries
  File "/home/cfd/.local/lib/python3.7/site-packages/pytube/request.py", line 161, in stream
    timeout=timeout
  File "/home/cfd/.local/lib/python3.7/site-packages/pytube/request.py", line 37, in _execute_request
    return urlopen(request, timeout=timeout)  # nosec
  File "/usr/lib/python3.7/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.7/urllib/request.py", line 525, in open
    response = self._open(req, data)
  File "/usr/lib/python3.7/urllib/request.py", line 543, in _open
    '_open', req)
  File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 1367, in https_open
    context=self._context, check_hostname=self._check_hostname)
  File "/usr/lib/python3.7/urllib/request.py", line 1326, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 111] Connection refused>

«Zeecka/pytube@fix_1060» patch is also able to create an video file, but it has 0 bytes.

Did I do something wrong? How can I contribute to this issue?

I’ve been getting this error on several programs for now.
I’ve tried upgrading pytube, reinstalling it, tried some fixes, changed URLs and code, but nothing seems to work.

from pytube import YouTube

#ask for the link from user
link = input("Enter the link of YouTube video you want to download:  ")
yt = YouTube(link)

#Showing details
print("Title: ",yt.title)
print("Number of views: ",yt.views)
print("Length of video: ",yt.length)
print("Rating of video: ",yt.rating)
#Getting the highest resolution possible
ys = yt.streams.get_highest_resolution()

#Starting download
print("Downloading...")
ys.download()
print("Download completed!!")

and this is the error code:

  File "C:UsersMadjidPycharmProjectspythonProjectapp2.py", line 6, in <module>
    yt = YouTube(link)
  File "C:UsersMadjidPycharmProjectspythonProjectvenvlibsite-packagespytube__main__.py", line 91, in __init__
    self.prefetch()
  File "C:UsersMadjidPycharmProjectspythonProjectvenvlibsite-packagespytube__main__.py", line 181, in prefetch
    self.vid_info_raw = request.get(self.vid_info_url)
  File "C:UsersMadjidPycharmProjectspythonProjectvenvlibsite-packagespytuberequest.py", line 36, in get
    return _execute_request(url).read().decode("utf-8")
  File "C:UsersMadjidPycharmProjectspythonProjectvenvlibsite-packagespytuberequest.py", line 24, in _execute_request
    return urlopen(request)  # nosec
  File "E:Pythonliburllibrequest.py", line 214, in urlopen
    return opener.open(url, data, timeout)
  File "E:Pythonliburllibrequest.py", line 523, in open
    response = meth(req, response)
  File "E:Pythonliburllibrequest.py", line 632, in http_response
    response = self.parent.error(
  File "E:Pythonliburllibrequest.py", line 555, in error
    result = self._call_chain(*args)
  File "E:Pythonliburllibrequest.py", line 494, in _call_chain
    result = func(*args)
  File "E:Pythonliburllibrequest.py", line 747, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
  File "E:Pythonliburllibrequest.py", line 523, in open
    response = meth(req, response)
  File "E:Pythonliburllibrequest.py", line 632, in http_response
    response = self.parent.error(
  File "E:Pythonliburllibrequest.py", line 561, in error
    return self._call_chain(*args)
  File "E:Pythonliburllibrequest.py", line 494, in _call_chain
    result = func(*args)
  File "E:Pythonliburllibrequest.py", line 641, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 410: Gone

Hello Guys, How are you all? Hope You all Are Fine. Today I am Using pytube and when I run my code I am facing the following error urllib.error.HTTPError: HTTP Error 410: Gone in Pytube Python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

Contents

  1. How urllib.error.HTTPError: HTTP Error 410: Gone in Pytube Error Occurs ?
  2. How To Solve urllib.error.HTTPError: HTTP Error 410: Gone in Pytube Error ?
  3. Solution 1: Update pytube to 11.0.0
  4. Solution 2: Use this commandline
  5. Solution 3
  6. Summary

I am Using pytube and when I run my code I am facing the following error.

  File "C:Pythonliburllibrequest.py", line 641, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 410: Gone

Here is my Code.

from pytube import YouTube

#ask for the link from user
link = input("link of YouTube video you want to download:  ")
yt = YouTube(link)

#highest Resolution
ys = yt.streams.get_highest_resolution()

#download
ys.download()

How To Solve urllib.error.HTTPError: HTTP Error 410: Gone in Pytube Error ?

  1. How To Solve urllib.error.HTTPError: HTTP Error 410: Gone in Pytube Error?

    To Solve urllib.error.HTTPError: HTTP Error 410: Gone in Pytube Error This issue is fixed in the latest version of pytube 11.0.0. Just update it with this command. python -m pip install –upgrade pytube

  2. urllib.error.HTTPError: HTTP Error 410: Gone in Pytube

    To Solve urllib.error.HTTPError: HTTP Error 410: Gone in Pytube Error This issue is fixed in the latest version of pytube 11.0.0. Just update it with this command. python -m pip install –upgrade pytube

Solution 1: Update pytube to 11.0.0

This issue is fixed in the latest version of pytube 11.0.0. Just update it with this command.

python -m pip install --upgrade pytube

Solution 2: Use this commandline

This issue has been fixed by Zeecka. You can install Pytube from

python -m pip install git+https://github.com/Zeecka/pytube@fix_1060

Solution 3

This issue has been fixed by Ssuwani. You can install Pytube from

pip install git+https://github.com/ssuwani/pytube 

Summary

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

  • SyntaxError: invalid syntax to repo init in the AOSP code.

Содержание

  1. urllib.error.HTTPError: HTTP Error 410: Gone #1295
  2. Comments
  3. raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 410: Gone #1170
  4. Comments
  5. Footer
  6. Почему я получаю ошибку HTTP 410 при попытке загрузить видео с YouTube с помощью pytube?
  7. HTTP Error 410: Gone. Using outdated API? #165
  8. Comments
  9. [Youtube] HTTP Error 410: Gone. ERROR: Sign in to confirm your age #30019
  10. Comments
  11. Error code:
  12. WARNING: unable to download video info webpage: HTTP Error 410: Gone ERROR: Sign in to confirm your age This video may be inappropriate for some users.
  13. Checklist
  14. Verbose log
  15. Description

urllib.error.HTTPError: HTTP Error 410: Gone #1295

Describe the bug
Trying to download videos with both the CLI interface and pytube module fails with the error: urllib.error.HTTPError: HTTP Error 410: Gone

To Reproduce
Execute: $ pytube https://youtube.com/watch?v=2lAe1cqCOXo

Expected behavior
Usually, it just works and downloads the video.

Output
Loading video. Traceback (most recent call last): File «/home/aile_/.local/bin/pytube», line 33, in sys.exit(load_entry_point(‘pytube==12.0.0’, ‘console_scripts’, ‘pytube’)()) File «/home/aile_/.local/lib/python3.10/site-packages/pytube/cli.py», line 48, in main youtube = YouTube(args.url) File «/home/aile_/.local/lib/python3.10/site-packages/pytube/__main__.py», line 91, in __init__ self.prefetch() File «/home/aile_/.local/lib/python3.10/site-packages/pytube/__main__.py», line 181, in prefetch self.vid_info_raw = request.get(self.vid_info_url) File «/home/aile_/.local/lib/python3.10/site-packages/pytube/request.py», line 36, in get return _execute_request(url).read().decode(«utf-8») File «/home/aile_/.local/lib/python3.10/site-packages/pytube/request.py», line 24, in _execute_request return urlopen(request) # nosec File «/usr/lib/python3.10/urllib/request.py», line 216, in urlopen return opener.open(url, data, timeout) File «/usr/lib/python3.10/urllib/request.py», line 525, in open response = meth(req, response) File «/usr/lib/python3.10/urllib/request.py», line 634, in http_response response = self.parent.error( File «/usr/lib/python3.10/urllib/request.py», line 557, in error result = self._call_chain(*args) File «/usr/lib/python3.10/urllib/request.py», line 496, in _call_chain result = func(*args) File «/usr/lib/python3.10/urllib/request.py», line 749, in http_error_302 return self.parent.open(new, timeout=req.timeout) File «/usr/lib/python3.10/urllib/request.py», line 525, in open response = meth(req, response) File «/usr/lib/python3.10/urllib/request.py», line 634, in http_response response = self.parent.error( File «/usr/lib/python3.10/urllib/request.py», line 563, in error return self._call_chain(*args) File «/usr/lib/python3.10/urllib/request.py», line 496, in _call_chain result = func(*args) File «/usr/lib/python3.10/urllib/request.py», line 643, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 410: Gone

System information
Please provide the following information:

  • Python version Python 3.10.4
  • Pytube version 9.6.4
  • Command used to install pytube python -m pip install git+https://github.com/pytube/pytube

The text was updated successfully, but these errors were encountered:

Источник

raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 410: Gone #1170

How to fix this ? This was working , 5 months back .. : (

The text was updated successfully, but these errors were encountered:

Thank you for contributing to PyTube. Please remember to reference Contributing.md

代码是:
`from pytube import YouTube

yt = YouTube(«http://www.youtube.com/watch?v=Ik-RsDGPI5Y»)
print(yt.streams.all())
`
报错日志是:
/Applications/anaconda3/bin/python3 /Users/solo/Documents/TestWorkSpace/AA_000通用test/AA_pytube_test/pytube_test.py
Traceback (most recent call last):
File «/Users/solo/Documents/TestWorkSpace/AA_000通用test/AA_pytube_test/pytube_test.py», line 4, in
print(yt.streams.all())
File «/Applications/anaconda3/lib/python3.8/site-packages/pytube/main.py», line 311, in streams
return StreamQuery(self.fmt_streams)
File «/Applications/anaconda3/lib/python3.8/site-packages/pytube/main.py», line 214, in fmt_streams
if «adaptive_fmts» in self.player_config_args:
File «/Applications/anaconda3/lib/python3.8/site-packages/pytube/main.py», line 188, in player_config_args
self._player_config_args = self.vid_info
File «/Applications/anaconda3/lib/python3.8/site-packages/pytube/main.py», line 281, in vid_info
return dict(parse_qsl(self.vid_info_raw))
File «/Applications/anaconda3/lib/python3.8/site-packages/pytube/main.py», line 109, in vid_info_raw
self._vid_info_raw = request.get(self.vid_info_url)
File «/Applications/anaconda3/lib/python3.8/site-packages/pytube/request.py», line 53, in get
response = _execute_request(url, headers=extra_headers, timeout=timeout)
File «/Applications/anaconda3/lib/python3.8/site-packages/pytube/request.py», line 37, in _execute_request
return urlopen(request, timeout=timeout) # nosec
File «/Applications/anaconda3/lib/python3.8/urllib/request.py», line 222, in urlopen
return opener.open(url, data, timeout)
File «/Applications/anaconda3/lib/python3.8/urllib/request.py», line 531, in open
response = meth(req, response)
File «/Applications/anaconda3/lib/python3.8/urllib/request.py», line 640, in http_response
response = self.parent.error(
File «/Applications/anaconda3/lib/python3.8/urllib/request.py», line 569, in error
return self._call_chain(*args)
File «/Applications/anaconda3/lib/python3.8/urllib/request.py», line 502, in _call_chain
result = func(*args)
File «/Applications/anaconda3/lib/python3.8/urllib/request.py», line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 410: Gone

Process finished with exit code 1

I dont think , this module is maintained now !

No response from maintainers 🙁

© 2023 GitHub, Inc.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

Почему я получаю ошибку HTTP 410 при попытке загрузить видео с YouTube с помощью pytube?

Я хочу скачать видео с YouTube с помощью Python. Я пробовал opencv с Python, но всегда была проблема. Я пытаюсь использовать pytube3 и Python 3. Я попробовал эту программу (которую я нашел в StackOverflow ):

Но это не удалось с ошибкой «HTTP Error 410». Я продолжаю получать «Ошибка HTTP 410», когда запускаю различные программы pytube. Я изменил URL-адрес и проверил URL-адреса в браузере. Ничего не работает, когда я запускаю программу Python для загрузки видео.

Я пытаюсь запустить эту программу (как я нашел здесь ):

HTTP Error 410: Gone Traceback (most recent call last): File «e.py», line 9, in yt_obj = YouTube(url) File «/home/jdoe/path_dir/lib/python3.8/site-packages/pytube/main.py», line 91, in init self.prefetch() File «/home/jdoe/path_dir/lib/python3.8/site-packages/pytube/main.py», line 181, in prefetch self.vid_info_raw = request.get(self.vid_info_url) File «/home/jdoe/path_dir/lib/python3.8/site-packages/pytube/request.py», line 36, in get return _execute_request(url).read().decode(«utf-8») File «/home/jdoe/path_dir/lib/python3.8/site-packages/pytube/request.py», line 24, in _execute_request return urlopen(request) # nosec File «/usr/lib/python3.8/urllib/request.py», line 222, in urlopen return opener.open(url, data, timeout) File «/usr/lib/python3.8/urllib/request.py», line 531, in open response = meth(req, response) File «/usr/lib/python3.8/urllib/request.py», line 640, in http_response response = self.parent.error( File «/usr/lib/python3.8/urllib/request.py», line 563, in error result = self._call_chain(*args) File «/usr/lib/python3.8/urllib/request.py», line 502, in _call_chain result = func(*args) File «/usr/lib/python3.8/urllib/request.py», line 755, in http_error_302 return self.parent.open(new, timeout=req.timeout) File «/usr/lib/python3.8/urllib/request.py», line 531, in open response = meth(req, response) File «/usr/lib/python3.8/urllib/request.py», line 640, in http_response response = self.parent.error( File «/usr/lib/python3.8/urllib/request.py», line 569, in error return self._call_chain(*args) File «/usr/lib/python3.8/urllib/request.py», line 502, in _call_chain result = func(*args) File «/usr/lib/python3.8/urllib/request.py», line 649, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 410: Gone

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File «e.py», line 14, in raise Exception(‘Some exception occurred.’) Exception: Some exception occurred.

Мои исследования показывают, что ошибка 410 связана с тем, что URL-адрес был найден, но затем перемещен. Поскольку проблема возникает с разными ссылками на YouTube и разными программами, я в недоумении. Как я могу избежать получения сообщений об ошибке 410 при использовании pytube?

Источник

HTTP Error 410: Gone. Using outdated API? #165

Thanks for this module! I have been trying my first steps today, by my requests produce an error:

When I login to PartnerNet, I currently see a huge red notification telling everyone that the API v4 has been discontinued since 31 March, 2020 (which was 5 weeks ago as I am typing this).

Is it possible the module still uses API v5, which would explain the error?

I’ll try using the new API without the wrapper for now. But would be happy about any response, if this is indeed the issue.

Detailed example below.

/projects/tolkien-stats/venv/lib/python3.6/site-packages/amazon/api.py in __iter__(self) 542 Yields a :class:`

.AmazonProduct` for each result item. 543 «»» —> 544 for page in self.iterate_pages(): 545 for item in getattr(page.Items, ‘Item’, []): 546 yield AmazonProduct(

/projects/tolkien-stats/venv/lib/python3.6/site-packages/amazon/api.py in iterate_pages(self) 559 while not self.is_last_page: 560 self.current_page += 1 —> 561 yield self._query(ItemPage=self.current_page, **self.kwargs) 562 except NoMorePages: 563 pass

/projects/tolkien-stats/venv/lib/python3.6/site-packages/amazon/api.py in _query(self, ResponseGroup, **kwargs) 571 An lxml root element. 572 «»» —> 573 response = self.api.ItemSearch(ResponseGroup=ResponseGroup, **kwargs) 574 root = objectify.fromstring(response) 575 if (hasattr(root.Items.Request, ‘Errors’) and

/projects/tolkien-stats/venv/lib/python3.6/site-packages/bottlenose/api.py in __call__(self, **kwargs) 272 # make the actual API call 273 response = self._call_api(api_url, —> 274 <‘api_url’: api_url, ‘cache_url’: cache_url>) 275 276 # decompress the response if need be

/projects/tolkien-stats/venv/lib/python3.6/site-packages/bottlenose/api.py in _call_api(self, api_url, err_env) 233 else: 234 # the simple way —> 235 return urllib2.urlopen(api_request, timeout=self.Timeout) 236 except: 237 if not self.ErrorHandler: /usr/lib/python3.6/urllib/request.py in urlopen(url, data, timeout, cafile, capath, cadefault, context) 221 else: 222 opener = _opener —> 223 return opener.open(url, data, timeout) 224 225 def install_opener(opener): /usr/lib/python3.6/urllib/request.py in open(self, fullurl, data, timeout) 530 for processor in self.process_response.get(protocol, []): 531 meth = getattr(processor, meth_name) —> 532 response = meth(req, response) 533 534 return response /usr/lib/python3.6/urllib/request.py in http_response(self, request, response) 640 if not (200 642 ‘http’, request, response, code, msg, hdrs) 643 644 return response /usr/lib/python3.6/urllib/request.py in error(self, proto, *args) 568 if http_err: 569 args = (dict, ‘default’, ‘http_error_default’) + orig_args —> 570 return self._call_chain(*args) 571 572 # XXX probably also want an abstract factory that knows when it makes /usr/lib/python3.6/urllib/request.py in _call_chain(self, chain, kind, meth_name, *args) 502 for handler in handlers: 503 func = getattr(handler, meth_name) —> 504 result = func(*args) 505 if result is not None: 506 return result /usr/lib/python3.6/urllib/request.py in http_error_default(self, req, fp, code, msg, hdrs) 648 class HTTPDefaultErrorHandler(BaseHandler): 649 def http_error_default(self, req, fp, code, msg, hdrs): —> 650 raise HTTPError(req.full_url, code, msg, hdrs, fp) 651 652 class HTTPRedirectHandler(BaseHandler): HTTPError: HTTP Error 410: Gone»>

The text was updated successfully, but these errors were encountered:

Источник

[Youtube] HTTP Error 410: Gone. ERROR: Sign in to confirm your age #30019

Error code:

WARNING: unable to download video info webpage: HTTP Error 410: Gone
ERROR: Sign in to confirm your age
This video may be inappropriate for some users.

Checklist

  • I’m reporting a broken site support issue
  • I’ve verified that I’m running youtube-dl version 2021.06.06
  • I’ve checked that all provided URLs are alive and playable in a browser
  • I’ve checked that all URLs and arguments with special characters are properly quoted or escaped
  • I’ve searched the bugtracker for similar bug reports including closed ones
  • I’ve read bugs section in FAQ

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [‘-f’, ‘bestvideo+bestaudio/best’, ‘https://www.youtube.com/watch?v=nSIPR2ZrfKQ’, ‘-v’]
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2021.06.06
[debug] Python version 3.4.4 (CPython) — Windows-10-10.0.19041
[debug] exe versions: ffmpeg 2021-07-18-git-694545b6d5-full_build-www.gyan.dev, ffprobe 2021-07-18-git-694545b6d5-full_build-www.gyan.dev
[debug] Proxy map: <>
[youtube] nSIPR2ZrfKQ: Downloading webpage
[youtube] nSIPR2ZrfKQ: Refetching age-gated info webpage
WARNING: unable to download video info webpage: HTTP Error 410: Gone
ERROR: Sign in to confirm your age
This video may be inappropriate for some users.
Traceback (most recent call last):
File «C:UsersdstAppDataRoamingBuild archiveyoutube-dlytdl-orgtmpkqxnwl31buildyoutube_dlYoutubeDL.py», line 815, in wrapper
File «C:UsersdstAppDataRoamingBuild archiveyoutube-dlytdl-orgtmpkqxnwl31buildyoutube_dlYoutubeDL.py», line 836, in __extract_info
File «C:UsersdstAppDataRoamingBuild archiveyoutube-dlytdl-orgtmpkqxnwl31buildyoutube_dlextractorcommon.py», line 534, in extract
File «C:UsersdstAppDataRoamingBuild archiveyoutube-dlytdl-orgtmpkqxnwl31buildyoutube_dlextractoryoutube.py», line 1713, in _real_extract
youtube_dl.utils.ExtractorError: Sign in to confirm your age
This video may be inappropriate for some users.

Description

Please kindly fix this issue or provide a valid solution that does not require a verified google account?

Note: After the download with this script failed, I noticed it’s possible to download this age-restricted youtube video using some online youtube-downloader websites without any access to a google account, while this script can’t download it, I believe the issue is within this script itself. Please kindly fix this issue?

Tnx and best of luck

The text was updated successfully, but these errors were encountered:

Источник

Im trying to run a youtube downloader with flask and pytube. I programmed it on my windows Pc and everything works fine but now when I try to use the site on my ubuntu server it gives me this error: urllib.error.HTTPError: HTTP Error 410: Gone

Its the same error like in other Posts but, the solution following to the answers is installing version 11.0.0. But I tryied version 11.0.0 and 12.0.0 and it only works on my Pc(Windows).

Maybe u know the problem.

asked Mar 7, 2022 at 16:57

FatCat's user avatar

410 GONE is a response from the remote server. However the remote server identifies this connection is resulting in the remote server sending a 410 GONE error. That’s nothing on your code or the script or the library, that’s how the remote server responds. There’s nothing we or anyone else can do to fix the 410 response from the remote server.

For the record, HTTP 410 GONE means this:

The HyperText Transfer Protocol (HTTP) 410 Gone client error response code indicates that access to the target resource is no longer available at the origin server and that this condition is likely to be permanent.

(from https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/410)

You should probably stop hitting the remote server with your requests, because 410 is a permanent error.


Alternatively, if you still believe this to be wrong or incorrect or false, you need to provide a copy of your code here for someone to test-run in a Linux environment and see if they get a 410 GONE still. Unfortunately, as is, there’s nothing anyone can do about this.

answered Mar 7, 2022 at 17:01

Thomas Ward's user avatar

Thomas WardThomas Ward

70.4k29 gold badges172 silver badges236 bronze badges

#python #amazon-web-services

#python #amazon-web-services

Вопрос:

Я пытаюсь создать программу, которая выполняет поиск в Amazon с использованием API amazon simple-product, но она показывает некоторую ошибку HTTP 410: Gone. Вот код.

 from amazon.api import AmazonAPI
amazon = AmazonAPI('A********************A', 'X**************************m', 
'1*******************0')
a=input(':')
results = amazon.search(Keywords = a, SearchIndex = "Books")
for item in results:
     print (item.title, item.isbn, item.price_and_currency)
 

Теперь это ошибка

 Traceback (most recent call last):
File "C:UserssusheelDesktopbooksearch.py", line 12, in <module>
for item in results:
File "C:UserssusheelAppDataLocalProgramsPythonPython38libsite-packagesamazonapi.py", line 
544, in __iter__
for page in self.iterate_pages():
File "C:UserssusheelAppDataLocalProgramsPythonPython38libsite-packagesamazonapi.py", line 
561, in iterate_pages
yield self._query(ItemPage=self.current_page, **self.kwargs)
File "C:UserssusheelAppDataLocalProgramsPythonPython38libsite-packagesamazonapi.py", line 
573, in _query
response = self.api.ItemSearch(ResponseGroup=ResponseGroup, **kwargs)
File "C:UserssusheelAppDataLocalProgramsPythonPython38libsite-packagesbottlenoseapi.py", 
line 273, in __call__
response = self._call_api(api_url,
File "C:UserssusheelAppDataLocalProgramsPythonPython38libsite-packagesbottlenoseapi.py", 
line 235, in _call_api
return urllib2.urlopen(api_request, timeout=self.Timeout)
File "C:UserssusheelAppDataLocalProgramsPythonPython38liburllibrequest.py", line 222, in 
urlopen
return opener.open(url, data, timeout)
File "C:UserssusheelAppDataLocalProgramsPythonPython38liburllibrequest.py", line 531, in 
open
response = meth(req, response)
File "C:UserssusheelAppDataLocalProgramsPythonPython38liburllibrequest.py", line 640, in 
http_response
response = self.parent.error(
File "C:UserssusheelAppDataLocalProgramsPythonPython38liburllibrequest.py", line 569, in 
error
return self._call_chain(*args)
File "C:UserssusheelAppDataLocalProgramsPythonPython38liburllibrequest.py", line 502, in 
_call_chain
result = func(*args)
File "C:UserssusheelAppDataLocalProgramsPythonPython38liburllibrequest.py", line 649, in 
http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 410: Gone
 

Пожалуйста, помогите мне.

Комментарии:

1. Код ответа на ошибку клиента HyperText Transfer Protocol (HTTP) 410 Gone указывает, что доступ к целевому ресурсу больше недоступен на исходном сервере и что это условие, вероятно, будет постоянным. Возможно Books , индекс поиска неверен. Вы пробовали другие индексы?

2. Индексы книг верны.

3. Этот пакет python уже давно не поддерживается и пытается использовать API Amazon, который перестал существовать несколько месяцев назад.

Понравилась статья? Поделить с друзьями:
  • Usb флешка медленно работает как исправить
  • Usb устройство ввода ошибка драйвера
  • Usb только для чтения как изменить
  • Urllib error httperror http error 404 not found
  • Urllib error httperror http error 403 ssl is required