How to get data from the address bar on python?
There is the code:
url = 'http://api.vkontakte.ru/oauth/authorize?client_id={id}&scope=friends&redirect_uri=' \
'http://api.vk.com/blank.html&display=page&response_type=token'
webbrowser.open_new_tab(url)
When you run the browser opens to allow the application access to information about friends (or the login form) when we allow, then get a link in the browser like this:
http://api.vk.com/blank.html#access_token={token}&expires_in={exp}&user_id={id}
Well, how to pass {token}, {exp}, {id} in the program?
Sorry, for my bad english :)
I had a similar problem. Try with this: http://learnpythonthehardway.org/book/ex51.html
Related
I want to implement bookmark. I have problem with saving correct URL, when I store complete URL this link work till session is same as current.
I can store URL as:
'f?p=':APP_ID||':'||:APP_PAGE_ID
but what to store as a session? Pages are not public.
Don't reinvent the wheel - use APEX_PAGE.GET_URL instead. For example:
select APEX_PAGE.GET_URL (p_page => :APP_PAGE) as URL
from dual;
The result is then something like this:
f?p=12488:3:109743317382702:::::
Live screenshot from apex.oracle.com:
When you type hackisition on Google, it returns the following url as first result:
https://www.hackisition.com/en/
// instead of
https://www.hackisition.com/
I'd like to replace that link by the real homepage. How can I do that? Is there a way to specifically ask Google to show this homepage?
I am getting "https://www.hackisition.com/" as first result for "hackisition". I'm not sure why you're getting such result. Try to clear cookies and turn off VPN/Proxy if you're using one.
We are getting result as you said , so I suggest to clear cache
Maybe that is because of User location.
That mean countries preferred English on search would be able to see /en
and other countries that not prefer English will see the non /en result.
Search your website on
Google.ae
Google.DK
you'll see https://www.hackisition.com in result not https://www.hackisition.com/en.
But if you search in Google.com, Google.eu you'll see the result https://www.hackisition.com/en
Hope this would be the solution of your problem.
I'm implementing a Compony newsfeed on a website and ran into the following problem. The LinkedIn API doesn't provide a direct URL to a company update. Looking at the LinkedIn site there are direct URL's and they're like this for example:
https://www.linkedin.com/company/1441/comments?topic=5849556347070205952&type=U&scope=1441&stype=C&a=5uHW&goback=%2Ebzo_*1_*1_*1_*1_*1_*1_*1_1441
Trying stuff out it seems that the parameters topic, type, scope, stype and a are mandatory for the URL to work.. (goback is the only one that isn't).
Using the LinkedIn API with the Company updates call I'm able to buid the direct url, except for the a parameter. The value is always 4 (for me unexplainable) characters long.
Has anyone ever successfully build a direct URL to a company update or can someone maybe explain the a parameter or how to generate its value?
Updated to new format
You can link directly to any update (company or user) using the following url:
https://www.linkedin.com/feed/update/urn:li:activity:[topic_id]
You can get [topic_id] by getting the last bit of the updateKey in the api response from Linkedin. When updateKey = UPDATE-c7352-6410848097894756353, your topic_id = 6410848097894756353.
In your example that would become https://www.linkedin.com/feed/update/urn:li:activity:5849556347070205952 which links directly to the specific update. The post is too old to work with the new link format
The url used to be
https://www.linkedin.com/nhome/updates/?topic=[topic_id]
Updated thanks to the comment from #sethpollack
For anyone trying to get the topic id from the API response object (as already commented on the OP question), the topic id is the value after the last hyphen of the updateKey property, which can be used with #Daan answer:
"updateKey": "UPDATE-cXXXX-YYYYYYYYYYYYYYYYYY"
Direct URL:
https://www.linkedin.com/nhome/updates?topic=[YYYYYYYYYYYYYYYYYY]
Using the URL format above, get the topic_id by opening the update in its own window/tab, look at the page source code in your browser and search for the string :activity: the long number after the string is the infamous topic_id
We are looking to implement rel=publisher to verify our website against our Google+ page.
However, according to the Rich Snippets tool, this only appears to work with a numeric page ID: e.g. https://plus.google.com/103037366582313115962/
However, we have a vanity URL https://plus.google.com/+TheGuardian
How can I find out our numeric page ID based on a Vanity URL?
OK, worked this out:
Go to https://plus.google.com/ as a Google+ user.
Search for your page using the search box
Copy the link location of the search result for your page. e.g. https://plus.google.com/u/1/113000071431138202574
...The last fragment of the URL is your Google+ page id
In order to get the 21 digit ID from a vanity URL, you need to utilize people.get API!
Just enter the vanity URL portion with the plus sign (for example +Name) as the userId here and scroll down to the 'Response' section to get your id.
Go to the G+ page
Press Ctrl+U then Ctrl+F
Type data-oid.
ex: data-oid="101059889519664604142"
You just have to do is right click on on name (page name or person name) select Copy Link Address & paste it in a new Tab you will see the code as my is https://plus.google.com/+InzimamTariq
but when I do that this is in return.
https://plus.google.com/109309640886924591969
hope you like it & it will help you
Go to -> www.Google.com
[Press] +UserName where "UserName" is your user name
(usually your email is UserName#google.com)
Hover over Home in top left for drop down menu
Just below Home you should see Profile <- click on Profile
Check your URL and if should look like this:
https://plus.google.com/u/0/+UserSetUrl/posts
or
https://plus.google.com/u/0/12398987468276/posts
The +UserSetURL is your google+ profile name.
If you have not created your own specific URL / ID then the numbers are your ID.
You should change the Numbers to something easy like MyName or UserID so you won't have to do this ever again.
Note: This is according to UI as of April 28, 2015
This is how my url looks be:
https://www.google.com/reader/api/0/mark-all-as-read?s=http://www.campionatoseriea.net&ts=1345114937
I can't understand why it doesn't work! I'm successfully logged in.
* EDIT *
https://www.google.com/reader/api/0/mark-all-as-read?s=feed/http://www.campionatoseriea.net/feed&ts=1346843394
I tried also this query but it doesn't work!
Try including the token parameter (T).
https://www.google.com/reader/api/0/mark-all-as-read?s=feed/http://www.campionatoseriea.net/feed&ts=1346843394&T=//cDr2ct8ynZS2I-P4x4cn1A
This document describes how to get a token.
?s=http://www.campionatoseriea.net
In the s you must pass the feed ID, not url. Here is example:
?s=feed/http://www.gsmarena.com/rss-news-reviews.php3