如何解决addEventListener,我可以将参数传递给函数吗?
HTTPError Traceback (most recent call last)
<ipython-input-12-6a4bc670faa6> in <module>
53 return ll
54
---> 55 italian_movies_1932_1933 = movies_wiki_list(range(1932,1934))
56 italian_movies_1932_1933
<ipython-input-12-6a4bc670faa6> in movies_wiki_list(years_span)
49 ll = []
50 for year in years_span:
---> 51 ll += get_wiki_list_italian_movies(year)
52 time.sleep(10)
53 return ll
<ipython-input-12-6a4bc670faa6> in get_wiki_list_italian_movies(year)
41 if b:
42 t= b.text
---> 43 if len(t) > 4 and TextBlob(t).detect_language() == 'it':
44 list_wiki.append(t.strip() + ' ' + str(year))
45
~\anaconda3\lib\site-packages\textblob\blob.py in detect_language(self)
566 :rtype: str
567 """
--> 568 return self.translator.detect(self.raw)
569
570 def correct(self):
~\anaconda3\lib\site-packages\textblob\translate.py in detect(self,source,host,type_)
70 data = {"q": source}
71 url = u'{url}&sl=auto&tk={tk}'.format(url=self.url,tk=_calculate_tk(source))
---> 72 response = self._request(url,host=host,type_=type_,data=data)
73 result,language = json.loads(response)
74 return language
~\anaconda3\lib\site-packages\textblob\translate.py in _request(self,url,type_,data)
90 if host or type_:
91 req.set_proxy(host=host,type=type_)
---> 92 resp = request.urlopen(req)
93 content = resp.read()
94 return content.decode('utf-8')
~\anaconda3\lib\urllib\request.py in urlopen(url,data,timeout,cafile,capath,cadefault,context)
220 else:
221 opener = _opener
--> 222 return opener.open(url,timeout)
223
224 def install_opener(opener):
~\anaconda3\lib\urllib\request.py in open(self,fullurl,timeout)
529 for processor in self.process_response.get(protocol,[]):
530 meth = getattr(processor,meth_name)
--> 531 response = meth(req,response)
532
533 return response
~\anaconda3\lib\urllib\request.py in http_response(self,request,response)
638 # request was successfully received,understood,and accepted.
639 if not (200 <= code < 300):
--> 640 response = self.parent.error(
641 'http',response,code,msg,hdrs)
642
~\anaconda3\lib\urllib\request.py in error(self,proto,*args)
561 http_err = 0
562 args = (dict,meth_name) + args
--> 563 result = self._call_chain(*args)
564 if result:
565 return result
~\anaconda3\lib\urllib\request.py in _call_chain(self,chain,kind,meth_name,*args)
500 for handler in handlers:
501 func = getattr(handler,meth_name)
--> 502 result = func(*args)
503 if result is not None:
504 return result
~\anaconda3\lib\urllib\request.py in http_error_302(self,req,fp,headers)
753 fp.close()
754
--> 755 return self.parent.open(new,timeout=req.timeout)
756
757 http_error_301 = http_error_303 = http_error_307 = http_error_302
~\anaconda3\lib\urllib\request.py in open(self,*args)
567 if http_err:
568 args = (dict,'default','http_error_default') + orig_args
--> 569 return self._call_chain(*args)
570
571 # XXX probably also want an abstract factory that knows when it makes
~\anaconda3\lib\urllib\request.py in _call_chain(self,meth_name)
--> 502 result = func(*args)
503 if result is not None:
504 return result
~\anaconda3\lib\urllib\request.py in http_error_default(self,hdrs)
647 class HTTPDefaultErrorHandler(BaseHandler):
648 def http_error_default(self,hdrs):
--> 649 raise HTTPError(req.full_url,hdrs,fp)
650
651 class HTTPRedirectHandler(BaseHandler):
HTTPError: HTTP Error 429: Too Many Requests
在这种情况下,我无法将参数传递给函数changeText-zh。 有没有方法,或者可以通过数据属性来完成,例如data-id =“ description1”
https://jsfiddle.net/Nata_Hamster/9qboL2x8/2/
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。