This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| '''NyashStatistics | |
| запрос для авторизации: | |
| https://oauth.vk.com/authorize?client_id=APP_ID&scope=messages,photos& | |
| redirect_uri=https://oauth.vk.com/blank.html&display=page&v=5.27& | |
| response_type=token | |
| ответ после разрешения прав для приложения: | |
| https://oauth.vk.com/blank.html#access_token=TOKEN&expires_in=86400&user_id=UID | |
| TOKEN из ответа берём access_token и засовываем его в ACCESS_TOKEN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def f(l=[]): | |
| l.append(len(l)+1) | |
| print(l) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from bs4 import BeautifulSoup as bs | |
| import urllib.request as req | |
| ''' get statistics''' | |
| wall_of_shame = req.urlopen('http://python3wos.appspot.com/').read().decode() | |
| soup = bs(wall_of_shame, 'html.parser') | |
| rows = soup.find_all('tr')[1:] | |
| d = {'py3False':[], 'py3True':[]} |