import requests
url="https://rasm.io/"
resp=requests.get(url)
This code dont work in google colab.
I try change User Agent approach or use session function But not working.
Related
I'm trying to implement the Google Analytics's Workbox Plugin on my application, which works most of the time offline. I used the webpack plugin as well to generate the service worker (SW). I used the method GenerateSW({offlineGoogleAnalytics: true}). But, unfortunately, after the SW be registered it didn't created an database for the workbox background sync, neither a table for the request (as seeing on this demo). On my application the SW is active and running but it doens't make requests, neither setup the indexDB. I'm using and local version of the gtag.js and it works as expected when the application is online, the events are logged on Analytics real time dashboard. But offline the requests aren't saved to be resent later. What I missed for this feature to work?
I am trying to connect the FitbitAPI to my flutter-firebase application. However, whenever I authenticate my account it doesn't redirect back to my application. I used the Implicit Grant Flow since I am not working with a server to power my backend. However, I do not have a way to get the token written in the browser url. An example of this is :
https://MYFIREBASEPROJECT.firebaseapp.com/__/auth/handler#access_token=eyJhbGciOiJIUzI1NiJ9.egfhwerqwjehqwkjehkashdaadadsadybG9jIHJ3ZW123123123sdsadsaasdasdagcnBybyByc2xlIiwiZXhwIjoxNTczMjk5ODQ2LCJpYXQiOjE1NzI2OTUwNDZ9.axlEiYsVicy6l-aEbphcqZlr3bHXUxq6hV2ky5o_3qw&user_id=7SFL86&scope=social+location+weight+nutrition+activity+sleep+settings+heartrate+profile&token_type=Bearer&expires_in=604800
I would like a way for me to get the last url from an in-app web browser. The in-app-browser package I use is web_browser
With that package , no.
You could use https://pub.dev/packages/flutter_webview_plugin wich allows you to launch a webview inside your app , and have full control of it.
Or you could use your package or https://pub.dev/packages/url_launcher to launch an external browser wich you don't control, but redirect to a deeplink that opens your app and handle it with https://pub.dev/packages/uni_links
So both methods are possible
EDIT:
A brief explanation of how a deeplink works.
Most of the urls start with "http://", that tells the browser to open a webpage with the domain of the url. However, if you use other start of the url , the browser does different things. In android per example if you type whatsapp://app in your browser url and launch it, it will launch the whatsapp app. The same can be done for your app oauth. The only thing you will need to implement it is configure your android app. The brief concept can be found here , but to communicate the android app deeplink with flutter you need uni_links , they also provide a tutorial in their package page. You can find a tutorial for flutter HERE
I've 2 different API keys enabled on 2 different accounts. One professional and the second private and I don't want to link the 2.
My problem is that I've been working with the professional API credentials for almost 3 months and everything works fine. Now, I've created a new account with a new Analytics account and my problem is that I can't use the new API directly with my new Analytics account.
I can't make my script to authorize the new user and I receive an error that says that the user does not have sufficient permissions for this profile.
I managed to make it work by adding my private account as a user in my professional Analytics account. It seems like I can't make another account authorization even if I'm using a different API created on another account. It's like the connects to the first account authorized on my PC.
Is there any way to reset the authorization on my PC each time I want to use one of the API?
Thank you,
EDIT: I'm running a Python script that uses the Analytics API and the only time I have a prompt to authenticate it's the first time I use the application on a new PC. After that, the script runs without any prompt, The credentials are those of the API (client ID and Client secret) and I'm not using them directly but I'm using the client_serets.json file generated on the Google dev console.
I have figured it out. You'll have to navigate to this url https://myaccount.google.com/permissions?pli=1 and remove the service you want to remove.
We running a wordpress website use google oauth for third-party social login. (via WP Social Login plugin.) Former engineer is leave, and we cannot have past google account credential.
We face a problem shows:
Error 401
Error: deleted_client
The OAuth client was deleted.
but we can only see old client id and secret from website admin panel.
I wanna to know,
if we set up a new google oauth application id/secret, will it make user crash from login website?
Or, is it possible for us to restore/retrieve former application ownership and make it live again?
This happened to me when I was working on an Add-On (maybe not completely related to this question but similar). I mistakenly deleted a Client ID that I thought we weren't using.
How I solved it:
Created a new project in Google Cloud
Associated the Apps Script project (Add-on) to this new Google Cloud project
Then I re-associated the App Script project with my previous Google Cloud project
The previous step will re-compile, create and associate the Client ID to the App Script project. It will contain all settings from the Client ID manually created and associated with your project in the code.
Maybe this will give some light to anyone having a similar problem.
Here use this link:
https://support.google.com/cloud/answer/6251787?hl=en
You have to reach google and they will help you out, this is the only solution you can do.
In my case, the simplest/only path (though certainly not ideal) ended up being to create a new Firebase project and start using that.
This of course can be problematic if you have a lot of data to move and/or a nontrivial data schema - say, with nested collections. For me, it was worth the effort to get unblocked from Sign-In suddenly failing to work.
... ah, OAuth fun
=======
If you are trying to make the new Client ID work .. though it's not a total solution, but after searching for a while, found this config option in Firebase console - where you enable Google Sign In.
So if you generate a new OAuth Client ID, update the ID & secret there.
After I did this, it went from a 401 error to a 400 mis_direct , which I think was step in the right direction.
I've been trying to send data to Google Analytics through url, but it's not working.
Here is the url:
http://www.google-analytics.com/__utm.gif?utmac=MY-UA
&utmn=0.57942900+13058623924dd5e0f88d784
&utmp=%2Fmypage.html
&utmr=http%3A%2F%2Fpp.test%2Fmypage-ref.html
&utmdt=test+ga&utmul=en-us
&utmhn=pp.test
&utmcc=__utmz%3D1.1304060743.1.1.utmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%3B+__utma%3D1.100229728.1304060743.1304060743.1304060743.1%3B+__utmz%3D185677488.1304391672.1.1.utmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%3B+__utma%3D185677488.2126025763.1304391672.1304667350.1305106191.6%3B+PHPSESSID%3Dpghin7v4q3g5lssq5c5mjchfj6
&utmcn=1
&utmcr=1
&utmwv=1
&utmsr=1280x1024
&utmsc=32-bit
&utmcs=-
&utmje=0
I have been trying follow the parameter here http://code.google.com/apis/analytics/docs/concepts/gaConceptsOverview.html
I call the url by curl and tested through the address bar, but not working, no data in my Google Analytics :(
Any ideas please?
It's possible, although if you're trying to do it you're probably doing something wrong.
But there's more to it than you can see at first sight. The best way to achieve it is to use a mobile library for Google Analytics. Google already provides this for a couple of languages. These libraries are built to send data to Google Analytics via your server. And if you check the server code you'll see that there are some calculations involved. You can possibly change one of these libraries to be run without a request. They're not complicated.
http://code.google.com/mobile/analytics/docs/web/