safari

cookie和session的使用

試著忘記壹切 提交于 2020-07-24 14:04:59
import requests # 需要请求的目标地址 url= ' http://www.rrys2019.com/user/user ' headers ={ ' user-agent ' : ' Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Mobile Safari/537.36 ' } # 需要的登录地址 login_url= ' http://www.rrys2019.com/User/Login/ajaxLogin ' # 如果需要爬虫主动记录cookie并且携带cookie,那么在使用使用requests之前先调用session方法 # 并且使用session方法返回的对象发送请求即可 rep=requests.session() # 可以自动记录cookie data = { ' account ' : ' ' , ' password ' : ' ' , ' remember ' : ' 1 ' , ' url_back ' : ' http://www.rrys2019.com/user/user ' } res =rep.post(url=login_url,headers

Ajaxupload.js在最新版chrome 83版浏览器oncomplete失效问题解决方法

荒凉一梦 提交于 2020-07-24 02:46:40
很多老的项目用ajaxupload 上传文件,但chrome浏览器升级到83版本后,oncomplete 方法就失效了。 查看了ajaxupload源码后,Github:Ajaxupload.js _createIframe: function(){ // We can't use getTime, because it sometimes return // same value in safari :( var id = getUID(); // We can't use following code as the name attribute // won't be properly registered in IE6, and new window // on form submit will open // var iframe = document.createElement('iframe'); // iframe.setAttribute('name', id); var iframe = toElement('<iframe src="javascript:false;" name="' + id + '" />'); // src="javascript:false; was added // because it possibly removes ie6

Error: AADSTS50058: A silent sign-in request was sent but no user is signed in - Angular ADAL authentication issue in mobile safari browser

允我心安 提交于 2020-07-21 07:01:39
问题 We have a site developed using Angular 7 and it uses Adal-Angular4 library for Azure Active Directoty authentication. When the site is browsed in safari on iPhone, it runs into below error. Error: AADSTS50058: A silent sign-in request was sent but no user is signed in. The cookies used to represent the user's session were not sent in the request to Azure AD. This can happen if the user is using Internet Explorer or Edge, and the web app sending the silent sign-in request is in different IE

Error: AADSTS50058: A silent sign-in request was sent but no user is signed in - Angular ADAL authentication issue in mobile safari browser

徘徊边缘 提交于 2020-07-21 07:01:11
问题 We have a site developed using Angular 7 and it uses Adal-Angular4 library for Azure Active Directoty authentication. When the site is browsed in safari on iPhone, it runs into below error. Error: AADSTS50058: A silent sign-in request was sent but no user is signed in. The cookies used to represent the user's session were not sent in the request to Azure AD. This can happen if the user is using Internet Explorer or Edge, and the web app sending the silent sign-in request is in different IE

2020: iOS Safari Video Autoplay Options?

。_饼干妹妹 提交于 2020-07-19 11:31:41
问题 All of my research and effort has been hitting a wall so far in this regard: Is there any way to make video autoplay on Safari in iOS currently? Some have mentioned video transcoding or using playsinline (which works on Android), but nothing has worked for iOS / Safari. 回答1: I believe the following is still the current picture for iOS: elements will now honor the autoplay attribute, for elements which meet the following conditions: elements will be allowed to autoplay without a user gesture

2020: iOS Safari Video Autoplay Options?

匆匆过客 提交于 2020-07-19 11:30:33
问题 All of my research and effort has been hitting a wall so far in this regard: Is there any way to make video autoplay on Safari in iOS currently? Some have mentioned video transcoding or using playsinline (which works on Android), but nothing has worked for iOS / Safari. 回答1: I believe the following is still the current picture for iOS: elements will now honor the autoplay attribute, for elements which meet the following conditions: elements will be allowed to autoplay without a user gesture

CORS on canvas not working on Chrome and Safari

…衆ロ難τιáo~ 提交于 2020-07-18 17:00:12
问题 I'm trying to display images on a canvas. The images are hosted on S3. CORS is set up on AWS, and the CrossOrigin attribute is set to anonymous in the script. Everything works fine on Firefox — but images are not being loaded on Chrome and Safari. Errors Safari: Origin https://www.example.com is not allowed by Access-Control-Allow-Origin. http://mybucket.s3.amazonaws.com/bubble/foo.PNG [Error] Failed to load resource: Origin https://www.example.com is not allowed by Access-Control-Allow

Iframe on load triggering even if iframe is not loaded on Safari

ぃ、小莉子 提交于 2020-07-10 08:57:05
问题 I had problem with iframe that was loading a document using google document viewer, sometimes the document would not load. I used this solution to check if iframe is successfully loaded, or if it should be reloaded. The solution works great on pc(chrome), but on iphone(safari) $('#iframe').on('load', ...) event triggers even when there is no content. On pc on load event is only triggered when iframe is trully loaded and has content. function reloadIFrame() { document.getElementById("ifm").src

Frontend JavaScript request gets 302-redirected but ultimately fails

ε祈祈猫儿з 提交于 2020-07-09 14:29:48
问题 I'm trying to create an audio visualization for a podcast network, using the Web Audio API with createMediaElementSource() very similarly to the model explained in this tutorial. So far I've gotten it to work fine in Chrome, and you can see it here (note: click on the red box to start it). Update : Based on discussion in the comments, it’s now become clear that the problem happens because the request gets redirected to another URL, by way of a 302 redirect. However, Safari refuses to work,

Frontend JavaScript request gets 302-redirected but ultimately fails

左心房为你撑大大i 提交于 2020-07-09 14:29:26
问题 I'm trying to create an audio visualization for a podcast network, using the Web Audio API with createMediaElementSource() very similarly to the model explained in this tutorial. So far I've gotten it to work fine in Chrome, and you can see it here (note: click on the red box to start it). Update : Based on discussion in the comments, it’s now become clear that the problem happens because the request gets redirected to another URL, by way of a 302 redirect. However, Safari refuses to work,