'v'
Request Method: | GET |
---|---|
Request URL: | https://wesharescience.com/14163/ |
Django Version: | 3.2.8 |
Exception Type: | KeyError |
Exception Value: | 'v' |
Exception Location: | /var/www/html/wesharescience.com/public_html/wesharescience/./cards/templatetags/get_title.py, line 39, in video_title |
Python Executable: | /usr/local/bin/uwsgi |
Python Version: | 3.8.10 |
Python Path: | ['.', '', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages'] |
Server time: | Thu, 28 Mar 2024 18:41:58 +0000 |
In template /var/www/html/wesharescience.com/public_html/wesharescience/home/templates/details.html
, error at line 139
129 | <span class="material-symbols-outlined " title="Add to my watch-later list" > |
---|---|
130 | update |
131 | </span> |
132 | </button> |
133 | |
134 | {% endif %} |
135 | |
136 | {% endif %} |
137 | |
138 | |
139 | <p> <b> {{ card.video_url|video_title }}</b></p> |
140 | <p class="card-text">{{ card.description }}</p> |
141 | <br> |
142 | |
143 | {% if card.article_url %} |
144 | |
145 | <a href="{{ card.article_url }}" class="btn btn-primary" target="_blank" style="text-align: center; margin-top: 0.5rem; border: none;; font-size:1.1em;padding-right: 3px;color:white; display: inline-block;"><i class="fa-regular fa-newspaper" style='font-size:1.1em;padding-right: 3px;color:white'></i> <span style="padding-right:10px;color:white;">Read the Article</span> </a> |
146 | <br> |
147 | {% endif %} |
148 | |
149 | <br> |
/usr/local/lib/python3.8/dist-packages/django/core/handlers/exception.py
, line 47, in inner
response = await sync_to_async(response_for_exception, thread_sensitive=False)(request, exc)
return response
return inner
else:
@wraps(get_response)
def inner(request):
try:
response = get_response(request)…
except Exception as exc:
response = response_for_exception(request, exc)
return response
return inner
Variable | Value |
---|---|
exc | KeyError('v') |
get_response | <bound method BaseHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7fa7509dfa30>> |
request | <WSGIRequest: GET '/14163/'> |
/usr/local/lib/python3.8/dist-packages/django/core/handlers/base.py
, line 181, in _get_response
if response is None:
wrapped_callback = self.make_view_atomic(callback)
# If it is an asynchronous view, run it in a subthread.
if asyncio.iscoroutinefunction(wrapped_callback):
wrapped_callback = async_to_sync(wrapped_callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)…
except Exception as e:
response = self.process_exception_by_middleware(e, request)
if response is None:
raise
# Complain if the view returned None (a common error).
Variable | Value |
---|---|
callback | <function details at 0x7fa750650b80> |
callback_args | () |
callback_kwargs | {'card_id': 14163} |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7fa750978310>> |
request | <WSGIRequest: GET '/14163/'> |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7fa7509dfa30> |
wrapped_callback | <function details at 0x7fa750650b80> |
/var/www/html/wesharescience.com/public_html/wesharescience/./cards/views.py
, line 674, in details
"login_form": LoginForm,
"signup_form": SignUpForm,
"wishlist": [] if not wishlist else json.loads(wishlist.favorite_cards),
}
return render(request, "details.html", context)…
# contact form
Variable | Value |
---|---|
card | <Card: Overall winner & People's Choice award winner, Jennifer Campbell (Engineering Physics), presents her research ("Nanocantilevers: a new tool for medical diagnostics" ) in 3 minutes during Queen's University inaugural 3 Minute thesis competition 2012, for Queen's Masters and PhD candidates. > |
card_id | 14163 |
context | {'card': <Card: Overall winner & People's Choice award winner, Jennifer Campbell (Engineering Physics), presents her research ("Nanocantilevers: a new tool for medical diagnostics" ) in 3 minutes during Queen's University inaugural 3 Minute thesis competition 2012, for Queen's Masters and PhD candidates. >, 'id': 14163, 'login_form': <class 'cards.forms.LoginForm'>, 'signup_form': <class 'cards.forms.SignUpForm'>, 'wishlist': []} |
login_form | <LoginForm bound=True, valid=Unknown, fields=(username;password)> |
request | <WSGIRequest: GET '/14163/'> |
signup_form | <SignUpForm bound=True, valid=Unknown, fields=(username;email;first_name;last_name;password1;password2;check)> |
wishlist | [] |
/usr/local/lib/python3.8/dist-packages/django/shortcuts.py
, line 19, in render
def render(request, template_name, context=None, content_type=None, status=None, using=None):
"""
Return a HttpResponse whose content is filled with the result of calling
django.template.loader.render_to_string() with the passed arguments.
"""
content = loader.render_to_string(template_name, context, request, using=using)…
return HttpResponse(content, content_type, status)
def redirect(to, *args, permanent=False, **kwargs):
"""
Return an HttpResponseRedirect to the appropriate URL for the arguments
Variable | Value |
---|---|
content_type | None |
context | {'card': <Card: Overall winner & People's Choice award winner, Jennifer Campbell (Engineering Physics), presents her research ("Nanocantilevers: a new tool for medical diagnostics" ) in 3 minutes during Queen's University inaugural 3 Minute thesis competition 2012, for Queen's Masters and PhD candidates. >, 'id': 14163, 'login_form': <class 'cards.forms.LoginForm'>, 'signup_form': <class 'cards.forms.SignUpForm'>, 'wishlist': []} |
request | <WSGIRequest: GET '/14163/'> |
status | None |
template_name | 'details.html' |
using | None |
/usr/local/lib/python3.8/dist-packages/django/template/loader.py
, line 62, in render_to_string
template_name may be a string or a list of strings.
"""
if isinstance(template_name, (list, tuple)):
template = select_template(template_name, using=using)
else:
template = get_template(template_name, using=using)
return template.render(context, request)…
def _engine_list(using=None):
return engines.all() if using is None else [engines[using]]
Variable | Value |
---|---|
context | {'card': <Card: Overall winner & People's Choice award winner, Jennifer Campbell (Engineering Physics), presents her research ("Nanocantilevers: a new tool for medical diagnostics" ) in 3 minutes during Queen's University inaugural 3 Minute thesis competition 2012, for Queen's Masters and PhD candidates. >, 'id': 14163, 'login_form': <class 'cards.forms.LoginForm'>, 'signup_form': <class 'cards.forms.SignUpForm'>, 'wishlist': []} |
request | <WSGIRequest: GET '/14163/'> |
template | <django.template.backends.django.Template object at 0x7fa74f385c70> |
template_name | 'details.html' |
using | None |
/usr/local/lib/python3.8/dist-packages/django/template/backends/django.py
, line 61, in render
@property
def origin(self):
return self.template.origin
def render(self, context=None, request=None):
context = make_context(context, request, autoescape=self.backend.engine.autoescape)
try:
return self.template.render(context)…
except TemplateDoesNotExist as exc:
reraise(exc, self.backend)
def copy_exception(exc, backend=None):
"""
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'card': <Card: Overall winner & People's Choice award winner, Jennifer Campbell (Engineering Physics), presents her research ("Nanocantilevers: a new tool for medical diagnostics" ) in 3 minutes during Queen's University inaugural 3 Minute thesis competition 2012, for Queen's Masters and PhD candidates. >, 'id': 14163, 'login_form': <class 'cards.forms.LoginForm'>, 'signup_form': <class 'cards.forms.SignUpForm'>, 'wishlist': []}] |
request | <WSGIRequest: GET '/14163/'> |
self | <django.template.backends.django.Template object at 0x7fa74f385c70> |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
, line 170, in render
def render(self, context):
"Display stage -- can be called many times"
with context.render_context.push_state(self):
if context.template is None:
with context.bind_template(self):
context.template_name = self.name
return self._render(context)…
else:
return self._render(context)
def compile_nodelist(self):
"""
Parse and compile the template source into a nodelist. If debug
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'card': <Card: Overall winner & People's Choice award winner, Jennifer Campbell (Engineering Physics), presents her research ("Nanocantilevers: a new tool for medical diagnostics" ) in 3 minutes during Queen's University inaugural 3 Minute thesis competition 2012, for Queen's Masters and PhD candidates. >, 'id': 14163, 'login_form': <class 'cards.forms.LoginForm'>, 'signup_form': <class 'cards.forms.SignUpForm'>, 'wishlist': []}] |
self | <django.template.base.Template object at 0x7fa7505cd130> |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
, line 162, in _render
self.nodelist = self.compile_nodelist()
def __iter__(self):
for node in self.nodelist:
yield from node
def _render(self, context):
return self.nodelist.render(context)…
def render(self, context):
"Display stage -- can be called many times"
with context.render_context.push_state(self):
if context.template is None:
with context.bind_template(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'card': <Card: Overall winner & People's Choice award winner, Jennifer Campbell (Engineering Physics), presents her research ("Nanocantilevers: a new tool for medical diagnostics" ) in 3 minutes during Queen's University inaugural 3 Minute thesis competition 2012, for Queen's Masters and PhD candidates. >, 'id': 14163, 'login_form': <class 'cards.forms.LoginForm'>, 'signup_form': <class 'cards.forms.SignUpForm'>, 'wishlist': []}] |
self | <django.template.base.Template object at 0x7fa7505cd130> |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
, line 938, in render
# extend_nodelist().
contains_nontext = False
def render(self, context):
bits = []
for node in self:
if isinstance(node, Node):
bit = node.render_annotated(context)…
else:
bit = node
bits.append(str(bit))
return mark_safe(''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
bit | '\n\n\n<p> <b> ' |
bits | ['\n<!DOCTYPE html>\n<html lang="en">\n<head>\n ', '', '\n' '\n' '\n' ' <link rel="stylesheet" ' 'href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" ' 'integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" ' 'crossorigin="anonymous">\n' '\n' ' <meta charset="UTF-8">\n' ' <link ' 'href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"\n' ' rel="stylesheet"\n' ' ' 'integrity="sha384-wEmeIV1mKuiNpC+IOBjI7aAzPcEZeedi5yW5f2yOq55WWLwNGmvvx4Um1vskeMj0"\n' ' crossorigin="anonymous">\n' '\n' ' <link href="', '/static/fontawesomefree/css/fontawesome.css', '" rel="stylesheet" type="text/css">\n <link href="', '/static/fontawesomefree/css/brands.css', '" rel="stylesheet" type="text/css">\n <link href="', '/static/fontawesomefree/css/solid.css', '" rel="stylesheet" type="text/css">\n' ' \n' ' <script ' 'src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>\n' ' <script ' 'src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script> \n' ' \n' ' <script src="', '/static/js/jquery.bootstrap.modal.forms.min.js', '"></script>\n \n ', '\n' '\n' '\n' '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" ' '"http://www.w3.org/TR/html4/strict.dtd">\n' '<html>\n' '<head>\n' ' <!-- <link rel="stylesheet" href="css/responsive.css"> -->\n' ' <link rel="stylesheet" ' 'href="https://fonts.googleapis.com/icon?family=Material+Icons">\n' ' <link rel="stylesheet" ' 'href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">\n' '\n' ' \n' ' <script ' 'src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>\n' ' <!-- <script type="text/javascript" ' 'src="/static/home/js/main.js"></script> -->\n' ' \n' ' <!-- Popper JS -->\n' ' <script ' 'src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>\n' ' \n' ' <!-- Latest compiled JavaScript -->\n' ' <script ' 'src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>\n' ' \n' ' <!-- icon library -->\n' ' <link rel="stylesheet" ' 'href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> \n' '\n' ' <link href="/static/fontawesomefree/css/fontawesome.css" ' 'rel="stylesheet" type="text/css">\n' ' <link href="/static/fontawesomefree/css/brands.css" rel="stylesheet" ' 'type="text/css">\n' ' <link href="/static/fontawesomefree/css/solid.css" rel="stylesheet" ' 'type="text/css">\n' ' \n' ' <!-- Boostrap Modal-Forms app-->\n' ' <script src="/static/js/jquery.bootstrap.modal.forms.min.js"></script>\n' '\n' ' <link rel="shortcut icon" type="image/png" ' 'href="/static/home/favicon.ico"/>\n' '\n' ' <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\n' ' <meta http-equiv="Content-Style-Type" content="text/css">\n' ' <title>WeShareScience</title>\n' ' <meta name="Generator" content="Cocoa HTML Writer">\n' ' <meta name="CocoaVersion" content="2299">\n' '\n' '\n' ' <style type="text/css">\n' ' @import ' 'url("https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;400;600&display=swap");\n' ' @import ' 'url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css");\n' ' p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; color: ' '#000000; -webkit-text-stroke: #000000}\n' ' p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; color: ' '#000000; -webkit-text-stroke: #000000; min-height: 14.0px}\n' ' p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.4px Monaco; color: ' '#262626; -webkit-text-stroke: #262626; background-color: #f2f2f2; ' 'min-height: 19.0px}\n' ' span.s1 {font-kerning: none}\n' ' </style><b></b>\n' '\n' '\n' '\n' ' </head>\n' '</html>\n' '\n' '\n' '\n', '\n' '\n' ' \n' '\n' '\n' '\n' '<style>\n' '… <trimmed 17749 bytes string> |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'card': <Card: Overall winner & People's Choice award winner, Jennifer Campbell (Engineering Physics), presents her research ("Nanocantilevers: a new tool for medical diagnostics" ) in 3 minutes during Queen's University inaugural 3 Minute thesis competition 2012, for Queen's Masters and PhD candidates. >, 'id': 14163, 'login_form': <class 'cards.forms.LoginForm'>, 'signup_form': <class 'cards.forms.SignUpForm'>, 'wishlist': []}] |
node | <Variable Node: card.video_url|video_title> |
self | [<TextNode: '\n<!DOCTYPE html>\n<html la'>, <django.template.defaulttags.LoadNode object at 0x7fa750cffe50>, <TextNode: '\n\n\n <link rel="styleshee'>, <django.templatetags.static.StaticNode object at 0x7fa750624f70>, <TextNode: '" rel="stylesheet" type="'>, <django.templatetags.static.StaticNode object at 0x7fa74f71d610>, <TextNode: '" rel="stylesheet" type="'>, <django.templatetags.static.StaticNode object at 0x7fa74f71d3a0>, <TextNode: '" rel="stylesheet" type="'>, <django.templatetags.static.StaticNode object at 0x7fa74f6bcc40>, <TextNode: '"></script>\n \n '>, <django.template.loader_tags.IncludeNode object at 0x7fa74f6bc2b0>, <TextNode: '\n\n \n\n\n\n<style>\n\n.videoWra'>, <django.template.defaulttags.LoadNode object at 0x7fa74f6bc370>, <TextNode: '\n'>, <django.template.loader_tags.IncludeNode object at 0x7fa74f6bce50>, <TextNode: '\n'>, <django.template.defaulttags.LoadNode object at 0x7fa74f6bc400>, <TextNode: '\n <div style="margin-top'>, <django.template.defaulttags.LoadNode object at 0x7fa74f4501f0>, <TextNode: '\n <link rel="stylesheet"'>, <django.templatetags.static.StaticNode object at 0x7fa74f450250>, <TextNode: '">\n<script type="text/jav'>, <django.templatetags.static.StaticNode object at 0x7fa74f450730>, <TextNode: '"></script>\n\n '>, <django.template.defaulttags.LoadNode object at 0x7fa74f450ee0>, <TextNode: '\n\n '>, <IfNode>, <TextNode: '\n \n</div>\n\n<br>\n\n'>, <IfNode>, <TextNode: '\n\n\n<p> <b> '>, <Variable Node: card.video_url|video_title>, <TextNode: '</b></p>\n<p class="card-t'>, <Variable Node: card.description>, <TextNode: '</p>\n<br>\n\n'>, <IfNode>, <TextNode: '\n\n<br>\n'>, <IfNode>, <TextNode: '\n'>, <IfNode>, <TextNode: '\n'>, <IfNode>, <TextNode: '\n\n\n<br>\n<br>\n\n<hr width="'>, <django.template.library.SimpleNode object at 0x7fa74f394fa0>, <TextNode: '\n </th>\n <th>\n\n\n<h6'>, <django.template.defaulttags.LoadNode object at 0x7fa74f394df0>, <TextNode: '\n<table>\n <tr>\n <td>'>, <django.template.library.InclusionNode object at 0x7fa74f394580>, <TextNode: ' </td>\n <td> '>, <django.template.library.InclusionNode object at 0x7fa74f394e50>, <TextNode: ' </td>\n <td>'>, <django.template.library.InclusionNode object at 0x7fa74f394340>, <TextNode: ' </td>\n <td>'>, <django.template.library.InclusionNode object at 0x7fa74f3944c0>, <TextNode: '</td>\n <td>'>, <django.template.library.InclusionNode object at 0x7fa74f394100>, <TextNode: '</td>\n </tr>\n</table>\n\n<'>, <Variable Node: card.video_url|video_id>, <TextNode: '" class="btn btn-primary"'>, <django.template.defaulttags.URLNode object at 0x7fa74e4e6f40>, <TextNode: '";\n function to'>, <django.template.defaulttags.URLNode object at 0x7fa74e4e60a0>, <TextNode: '", // was toggle_favorit'>, <django.template.defaulttags.URLNode object at 0x7fa74e4e6b80>, <TextNode: '";\n function toggle_i'>, <django.template.defaulttags.URLNode object at 0x7fa74e4e6130>, <TextNode: '", // was toggle_favorit'>] |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
, line 905, in render_annotated
"""
Render the node. If debug is True and an exception occurs during
rendering, the exception is annotated with contextual line information
where it occurred in the template. For internal usage this method is
preferred over using the render method directly.
"""
try:
return self.render(context)…
except Exception as e:
if context.template.engine.debug and not hasattr(e, 'template_debug'):
e.template_debug = context.render_context.template.get_exception_info(e, self.token)
raise
def __iter__(self):
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'card': <Card: Overall winner & People's Choice award winner, Jennifer Campbell (Engineering Physics), presents her research ("Nanocantilevers: a new tool for medical diagnostics" ) in 3 minutes during Queen's University inaugural 3 Minute thesis competition 2012, for Queen's Masters and PhD candidates. >, 'id': 14163, 'login_form': <class 'cards.forms.LoginForm'>, 'signup_form': <class 'cards.forms.SignUpForm'>, 'wishlist': []}] |
self | <Variable Node: card.video_url|video_title> |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
, line 988, in render
self.filter_expression = filter_expression
def __repr__(self):
return "<Variable Node: %s>" % self.filter_expression
def render(self, context):
try:
output = self.filter_expression.resolve(context)…
except UnicodeDecodeError:
# Unicode conversion can fail sometimes for reasons out of our
# control (e.g. exception rendering). In that case, we fail
# quietly.
return ''
return render_value_in_context(output, context)
Variable | Value |
---|---|
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'card': <Card: Overall winner & People's Choice award winner, Jennifer Campbell (Engineering Physics), presents her research ("Nanocantilevers: a new tool for medical diagnostics" ) in 3 minutes during Queen's University inaugural 3 Minute thesis competition 2012, for Queen's Masters and PhD candidates. >, 'id': 14163, 'login_form': <class 'cards.forms.LoginForm'>, 'signup_form': <class 'cards.forms.SignUpForm'>, 'wishlist': []}] |
self | <Variable Node: card.video_url|video_title> |
/usr/local/lib/python3.8/dist-packages/django/template/base.py
, line 698, in resolve
else:
arg_vals.append(arg.resolve(context))
if getattr(func, 'expects_localtime', False):
obj = template_localtime(obj, context.use_tz)
if getattr(func, 'needs_autoescape', False):
new_obj = func(obj, autoescape=context.autoescape, *arg_vals)
else:
new_obj = func(obj, *arg_vals)…
if getattr(func, 'is_safe', False) and isinstance(obj, SafeData):
obj = mark_safe(new_obj)
else:
obj = new_obj
return obj
Variable | Value |
---|---|
arg_vals | [] |
args | [] |
context | [{'True': True, 'False': False, 'None': None}, {}, {}, {'card': <Card: Overall winner & People's Choice award winner, Jennifer Campbell (Engineering Physics), presents her research ("Nanocantilevers: a new tool for medical diagnostics" ) in 3 minutes during Queen's University inaugural 3 Minute thesis competition 2012, for Queen's Masters and PhD candidates. >, 'id': 14163, 'login_form': <class 'cards.forms.LoginForm'>, 'signup_form': <class 'cards.forms.SignUpForm'>, 'wishlist': []}] |
func | <function video_title at 0x7fa750518ca0> |
ignore_failures | False |
obj | 'http://www.youtube.com/watch?feature=player_embedded&amp;v=kuRw_4VSp44' |
self | <django.template.base.FilterExpression object at 0x7fa74f71d580> |
/usr/local/lib/python3.8/dist-packages/django/template/defaultfilters.py
, line 46, in _dec
"""
def _dec(*args, **kwargs):
args = list(args)
args[0] = str(args[0])
if (isinstance(args[0], SafeData) and
getattr(_dec._decorated_function, 'is_safe', False)):
return mark_safe(func(*args, **kwargs))
return func(*args, **kwargs)…
# Include a reference to the real function (used to check original
# arguments by the template parser, and to bear the 'is_safe' attribute
# when multiple decorators are applied).
_dec._decorated_function = getattr(func, '_decorated_function', func)
Variable | Value |
---|---|
_dec | <function video_title at 0x7fa750518ca0> |
args | ['http://www.youtube.com/watch?feature=player_embedded&amp;v=kuRw_4VSp44'] |
func | <function video_title at 0x7fa750518c10> |
kwargs | {} |
/var/www/html/wesharescience.com/public_html/wesharescience/./cards/templatetags/get_title.py
, line 39, in video_title
you_video_id = "ScMzIvxBSi4"
query = urlparse(url)
if query.hostname == 'youtu.be':
you_video_id = query.path[1:]
if query.hostname in ('www.youtube.com', 'youtube.com'):
if query.path == '/watch':
p = parse_qs(query.query)
you_video_id = p['v'][0]…
if query.path[:7] == '/embed/':
you_video_id = query.path.split('/')[2]
if query.path[:3] == '/v/':
you_video_id = query.path.split('/')[2]
VideoID = you_video_id
Variable | Value |
---|---|
p | {'amp;amp;v': ['kuRw_4VSp44'], 'feature': ['player_embedded']} |
query | ParseResult(scheme='http', netloc='www.youtube.com', path='/watch', params='', query='feature=player_embedded&amp;v=kuRw_4VSp44', fragment='') |
url | 'http://www.youtube.com/watch?feature=player_embedded&amp;v=kuRw_4VSp44' |
you_video_id | 'ScMzIvxBSi4' |
AnonymousUser
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
CONTENT_LENGTH | '' |
CONTENT_TYPE | '' |
CSRF_COOKIE | 'KJ6B91o0oz6ubKVCqFZcPPI5qFthdQua4KDfLreVZfpJBgOqGUFEJ0b9EnMWHTYW' |
CSRF_COOKIE_USED | True |
DOCUMENT_ROOT | '/var/www/html/wwesharescience.com/public_html/wesharesience' |
HTTPS | 'on' |
HTTP_ACCEPT | '*/*' |
HTTP_ACCEPT_ENCODING | 'gzip, br' |
HTTP_CDN_LOOP | 'cloudflare' |
HTTP_CF_CONNECTING_IP | '35.171.159.141' |
HTTP_CF_IPCOUNTRY | 'US' |
HTTP_CF_RAY | '86b9c1e0e85e87ac-EWR' |
HTTP_CF_VISITOR | '{"scheme":"https"}' |
HTTP_CONNECTION | 'Keep-Alive' |
HTTP_HOST | 'wesharescience.com' |
HTTP_REFERER | 'https://wesharescience.com/14163' |
HTTP_USER_AGENT | 'claudebot' |
HTTP_X_FORWARDED_FOR | '35.171.159.141' |
HTTP_X_FORWARDED_PROTO | 'https' |
PATH_INFO | '/14163/' |
QUERY_STRING | '' |
REMOTE_ADDR | '162.158.154.190' |
REMOTE_PORT | '55714' |
REQUEST_METHOD | 'GET' |
REQUEST_SCHEME | 'https' |
REQUEST_URI | '/14163/' |
SCRIPT_NAME | '' |
SERVER_NAME | 'wesharescience.com' |
SERVER_PORT | '443' |
SERVER_PROTOCOL | 'HTTP/1.1' |
uwsgi.node | b'sciencepods' |
uwsgi.version | b'2.0.19.1' |
wsgi.errors | <_io.TextIOWrapper name=2 mode='w' encoding='UTF-8'> |
wsgi.file_wrapper | <built-in function uwsgi_sendfile> |
wsgi.input | <uwsgi._Input object at 0x7fa74f831c50> |
wsgi.multiprocess | True |
wsgi.multithread | False |
wsgi.run_once | False |
wsgi.url_scheme | 'https' |
wsgi.version | (1, 0) |
wesharescience.settings
Setting | Value |
---|---|
ABSOLUTE_URL_OVERRIDES | {} |
ADMINS | [] |
ALLOWED_HOSTS | ['*'] |
APPEND_SLASH | True |
AUTHENTICATION_BACKENDS | ['django.contrib.auth.backends.ModelBackend'] |
AUTH_PASSWORD_VALIDATORS | '********************' |
AUTH_USER_MODEL | 'auth.User' |
BASE_DIR | PosixPath('/var/www/html/wesharescience.com/public_html/wesharescience') |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} |
CACHE_MIDDLEWARE_ALIAS | 'default' |
CACHE_MIDDLEWARE_KEY_PREFIX | '********************' |
CACHE_MIDDLEWARE_SECONDS | 600 |
CSRF_COOKIE_AGE | 31449600 |
CSRF_COOKIE_DOMAIN | None |
CSRF_COOKIE_HTTPONLY | False |
CSRF_COOKIE_NAME | 'csrftoken' |
CSRF_COOKIE_PATH | '/' |
CSRF_COOKIE_SAMESITE | 'Lax' |
CSRF_COOKIE_SECURE | False |
CSRF_FAILURE_VIEW | 'django.views.csrf.csrf_failure' |
CSRF_HEADER_NAME | 'HTTP_X_CSRFTOKEN' |
CSRF_TRUSTED_ORIGINS | [] |
CSRF_USE_SESSIONS | False |
DATABASES | {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.sqlite3', 'HOST': '', 'NAME': PosixPath('/var/www/html/wesharescience.com/public_html/wesharescience/db.sqlite3'), 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIGRATE': True, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': ''}} |
DATABASE_ROUTERS | [] |
DATA_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
DATA_UPLOAD_MAX_NUMBER_FIELDS | 1000 |
DATETIME_FORMAT | 'N j, Y, P' |
DATETIME_INPUT_FORMATS | ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M'] |
DATE_FORMAT | 'N j, Y' |
DATE_INPUT_FORMATS | ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y'] |
DEBUG | True |
DEBUG_PROPAGATE_EXCEPTIONS | False |
DECIMAL_SEPARATOR | '.' |
DEFAULT_AUTO_FIELD | 'django.db.models.BigAutoField' |
DEFAULT_CHARSET | 'utf-8' |
DEFAULT_EXCEPTION_REPORTER | 'django.views.debug.ExceptionReporter' |
DEFAULT_EXCEPTION_REPORTER_FILTER | 'django.views.debug.SafeExceptionReporterFilter' |
DEFAULT_FILE_STORAGE | 'django.core.files.storage.FileSystemStorage' |
DEFAULT_FROM_EMAIL | '[email protected]' |
DEFAULT_HASHING_ALGORITHM | 'sha256' |
DEFAULT_INDEX_TABLESPACE | '' |
DEFAULT_TABLESPACE | '' |
DISALLOWED_USER_AGENTS | [] |
EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' |
EMAIL_FILE_PATH | PosixPath('/var/www/html/wesharescience.com/public_html/wesharescience/sent_emails') |
EMAIL_HOST | 'smtp.gmail.com' |
EMAIL_HOST_PASSWORD | '********************' |
EMAIL_HOST_USER | '[email protected]' |
EMAIL_PORT | 587 |
EMAIL_SSL_CERTFILE | None |
EMAIL_SSL_KEYFILE | '********************' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
EMAIL_TIMEOUT | None |
EMAIL_USE_LOCALTIME | False |
EMAIL_USE_SSL | False |
EMAIL_USE_TLS | True |
FILE_UPLOAD_DIRECTORY_PERMISSIONS | None |
FILE_UPLOAD_HANDLERS | ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler'] |
FILE_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
FILE_UPLOAD_PERMISSIONS | 420 |
FILE_UPLOAD_TEMP_DIR | None |
FIRST_DAY_OF_WEEK | 0 |
FIXTURE_DIRS | [] |
FORCE_SCRIPT_NAME | None |
FORMAT_MODULE_PATH | None |
FORM_RENDERER | 'django.forms.renderers.DjangoTemplates' |
IGNORABLE_404_URLS | [] |
INSTALLED_APPS | ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django_extensions', 'bootstrap5', 'home', 'cards', 'accounts', 'star_ratings', 'django_social_share', 'fontawesomefree', 'bootstrap_modal_forms', 'widget_tweaks', 'django.contrib.sites', 'django.contrib.sitemaps'] |
INTERNAL_IPS | [] |
LANGUAGES | [('af', 'Afrikaans'), ('ar', 'Arabic'), ('ar-dz', 'Algerian Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('hy', 'Armenian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('ig', 'Igbo'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('ky', 'Kyrgyz'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('tg', 'Tajik'), ('th', 'Thai'), ('tk', 'Turkmen'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('uz', 'Uzbek'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')] |
LANGUAGES_BIDI | ['he', 'ar', 'ar-dz', 'fa', 'ur'] |
LANGUAGE_CODE | 'en-us' |
LANGUAGE_COOKIE_AGE | None |
LANGUAGE_COOKIE_DOMAIN | None |
LANGUAGE_COOKIE_HTTPONLY | False |
LANGUAGE_COOKIE_NAME | 'django_language' |
LANGUAGE_COOKIE_PATH | '/' |
LANGUAGE_COOKIE_SAMESITE | None |
LANGUAGE_COOKIE_SECURE | False |
LOCALE_PATHS | [] |
LOGGING | {} |
LOGGING_CONFIG | 'logging.config.dictConfig' |
LOGIN_REDIRECT_URL | '/' |
LOGIN_URL | '/accounts/login/' |
LOGOUT_REDIRECT_URL | '/' |
MANAGERS | [] |
MEDIA_ROOT | '' |
MEDIA_URL | '/' |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
MIDDLEWARE | ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware'] |
MIGRATION_MODULES | {} |
MONTH_DAY_FORMAT | 'F j' |
NUMBER_GROUPING | 0 |
PASSWORD_HASHERS | '********************' |
PASSWORD_RESET_TIMEOUT | '********************' |
PASSWORD_RESET_TIMEOUT_DAYS | '********************' |
PREPEND_WWW | False |
ROOT_URLCONF | 'wesharescience.urls' |
SECRET_KEY | '********************' |
SECURE_BROWSER_XSS_FILTER | False |
SECURE_CONTENT_TYPE_NOSNIFF | True |
SECURE_HSTS_INCLUDE_SUBDOMAINS | False |
SECURE_HSTS_PRELOAD | False |
SECURE_HSTS_SECONDS | 0 |
SECURE_PROXY_SSL_HEADER | None |
SECURE_REDIRECT_EXEMPT | [] |
SECURE_REFERRER_POLICY | 'same-origin' |
SECURE_SSL_HOST | None |
SECURE_SSL_REDIRECT | False |
SERVER_EMAIL | 'root@localhost' |
SESSION_CACHE_ALIAS | 'default' |
SESSION_COOKIE_AGE | 1209600 |
SESSION_COOKIE_DOMAIN | None |
SESSION_COOKIE_HTTPONLY | True |
SESSION_COOKIE_NAME | 'sessionid' |
SESSION_COOKIE_PATH | '/' |
SESSION_COOKIE_SAMESITE | 'Lax' |
SESSION_COOKIE_SECURE | False |
SESSION_ENGINE | 'django.contrib.sessions.backends.db' |
SESSION_EXPIRE_AT_BROWSER_CLOSE | False |
SESSION_FILE_PATH | None |
SESSION_SAVE_EVERY_REQUEST | False |
SESSION_SERIALIZER | 'django.contrib.sessions.serializers.JSONSerializer' |
SETTINGS_MODULE | 'wesharescience.settings' |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
SHORT_DATE_FORMAT | 'm/d/Y' |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
SILENCED_SYSTEM_CHECKS | [] |
SITE_ID | 1 |
STAR_RATINGS_ANONYMOUS | True |
STAR_RATINGS_RATING_MODEL | 'star_ratings.Rating' |
STATICFILES_DIRS | [] |
STATICFILES_FINDERS | ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
STATIC_ROOT | '/var/www/html/wesharescience.com/public_html/wesharescience/static/' |
STATIC_URL | '/static/' |
TEMPLATES | [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['templates'], 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages']}}] |
TEST_NON_SERIALIZED_APPS | [] |
TEST_RUNNER | 'django.test.runner.DiscoverRunner' |
THOUSAND_SEPARATOR | ',' |
TIME_FORMAT | 'P' |
TIME_INPUT_FORMATS | ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'] |
TIME_ZONE | 'UTC' |
USE_I18N | True |
USE_L10N | True |
USE_THOUSAND_SEPARATOR | False |
USE_TZ | True |
USE_X_FORWARDED_HOST | False |
USE_X_FORWARDED_PORT | False |
WSGI_APPLICATION | 'wesharescience.wsgi.application' |
X_FRAME_OPTIONS | 'DENY' |
YEAR_MONTH_FORMAT | 'F Y' |
You’re seeing this error because you have DEBUG = True
in your
Django settings file. Change that to False
, and Django will
display a standard page generated by the handler for this status code.