Модуль для создания скриптов для ВКонтакте | vk.com API wrapper

Overview

vk_api PyPI Python 3.6, 3.7, 3.8

vk_api – Python модуль для создания скриптов для ВКонтакте (vk.com API wrapper)

import vk_api

vk_session = vk_api.VkApi('+71234567890', 'mypassword')
vk_session.auth()

vk = vk_session.get_api()

print(vk.wall.post(message='Hello world!'))

Установка

$ pip3 install vk_api
Comments
  • Fixed/reworked VkTools.get_all_slow_iter method

    Fixed/reworked VkTools.get_all_slow_iter method

    Сначала я заметил, что в текущей реализации обрезаются первые max_count результатов. Это исправил в первом коммите.

    Затем, мне там же не понравились две вещи:

    1. Отдельный запрос только для того, чтобы узнать количество результатов
    2. Во время выполнения цикла количество элементов может измениться, и это надо учитывать

    Так что вторым коммитом идёт моя реализация этого метода

    opened by hdk5 25
  • Методы VkAudio возвращают пустую строку вместо ссылки на аудиозапись

    Методы VkAudio возвращают пустую строку вместо ссылки на аудиозапись

    Методы VkAudio возвращают пустую строку вместо ссылки на аудиозапись Наверняка проблема не в библиотеке, а просто ВК снова что-то шаманит с аудиозаписями, так как теперь тег <input type="hidden" value=""> пустой.

    Окружение

    vk_api: 11.7.0 python: 3.8

    API: 5.92

    Пример

    vk_session = VkApi("login", "password")
    vk_session.auth()
    
    vk_audio = VkAudio(vk_session)
    tracks = vk_audio.get()
    

    Используя инструменты разработчика в браузере я выяснил, что при нажатии на кнопку начала воспроизведения (в мобильной версии сайта) отправляется POST запрос на URL https://m.vk.com/audio c параметрами act=reload_audio и ids, а результатом запроса является нечто подобное: {'data': [[[456240032, 118264010, 'https://m.vk.com/mp3/audio_api_unavailable.mp3?extra=qxrqDO5AEhrWlZDfsLHPntPXqLHTCdGOzxnSyxqVsu9mCJfuns5LwxDyv2fLzdqXELH4qOLJzvboDNn5DgnOmxnInc1ZounUyMzTEMvqmtb0Dw5zus9UyxPPnJzIyxHksZbzmwnzx3zdCJaZBdz3ou1iyu5Uutq5C3PdB1fJswiXqwLmBM1YEw03s1rrrJaXt3u1lva1A2rdywrLBMrwmwDOy3PbCtrKDwmYm3v0zw94tI55n29PvZ1wAtuVBLD4vZ94t1DJsgiVEdHduOW3ow54x2vblOfZBLHsyxP1uNbWzdjVqwDzvY5yq28#AqS1nZi', 'One For The Money ', 'Escape The Fate', 198, 0, 0, '', 0, 2, ''...

    opened by qwertyadrian 24
  • Бан аккаунта

    Бан аккаунта

    Использую авторизацию через логин, пароль. Вчера вечером просто массово забанили 4 акка, за лимиты не выходил, да и никаких рассылок или других вещей не делал. У кого ещё такая проблема? Есть мнение из за чего это произошло?

    opened by heyyyoyy 20
  • Vk Bot Api Bug

    Vk Bot Api Bug

    Ошибка в BotLongpoll появляется даже при выполнении кода, приведенного в примере

    Печатает 85514032 для -170800454

    Traceback (most recent call last): File "C:\Users\User\Desktop\hsehelper\vkbot.py", line 67, in main() File "C:\Users\User\Desktop\hsehelper\vkbot.py", line 17, in main for event in longpoll.listen(): File "C:\Users\User\AppData\Local\Programs\Python\Python36-32\lib\site-packages\vk_api\bot_longpoll.py", line 271, in listen for event in self.check(): File "C:\Users\User\AppData\Local\Programs\Python\Python36-32\lib\site-packages\vk_api\bot_longpoll.py", line 251, in check for raw_event in response['updates'] File "C:\Users\User\AppData\Local\Programs\Python\Python36-32\lib\site-packages\vk_api\bot_longpoll.py", line 251, in for raw_event in response['updates'] File "C:\Users\User\AppData\Local\Programs\Python\Python36-32\lib\site-packages\vk_api\bot_longpoll.py", line 212, in _parse_event return event_class(raw_event) File "C:\Users\User\AppData\Local\Programs\Python\Python36-32\lib\site-packages\vk_api\bot_longpoll.py", line 158, in init if self.obj.peer_id < 0: TypeError: '<' not supported between instances of 'NoneType' and 'int'

    # -*- coding: utf-8 -*-
    import vk_api
    import options as o
    from vk_api.bot_longpoll import VkBotLongPoll, VkBotEventType
    
    
    def main():
        """ Пример использования bots longpoll
    
            https://vk.com/dev/bots_longpoll
        """
    
        vk_session = vk_api.VkApi(логин, пароль)
        vk_session.auth()
        longpoll = VkBotLongPoll(vk_session, идгруппы)
    
        for event in longpoll.listen():
    
            if event.type == VkBotEventType.MESSAGE_NEW:
                print('Новое сообщение:')
    
                print('Для меня от: ', end='')
    
                print(event.obj.from_id)
    
                print('Текст:', event.obj.text)
                print()
    
            elif event.type == VkBotEventType.MESSAGE_REPLY:
                print('Новое сообщение:')
    
                print('От меня для: ', end='')
    
                print(event.obj.peer_id)
    
                print('Текст:', event.obj.text)
                print()
    
            elif event.type == VkBotEventType.MESSAGE_TYPING_STATE:
                print('Печатает ', end='')
    
                print(event.obj.from_id, end=' ')
    
                print('для ', end='')
    
                print(event.obj.to_id)
                print()
    
            elif event.type == VkBotEventType.GROUP_JOIN:
                print(event.obj.user_id, end=' ')
    
                print('Вступил в группу!')
                print()
    
            elif event.type == VkBotEventType.GROUP_LEAVE:
                print(event.obj.user_id, end=' ')
    
                print('Покинул группу!')
                print()
    
            else:
                print(event.type)
                print()
    
    
    if __name__ == '__main__':
        main()
    ```
    opened by DevRedOWL 17
  • reply_to have to be message from same chat (Как боту ответить на сообщение?)

    reply_to have to be message from same chat (Как боту ответить на сообщение?)

    Мой код примерно такой:

    import vk_api
    from vk_api.bot_longpoll import VkBotLongPoll
    
    vk_session = vk_api.VkApi(token='мой токен')
    vk = vk_session.get_api()
    
    longpoll = VkBotLongPoll(vk_session, 'айди моей группы')
    
    for event in longpoll.listen():
            
            if event.from_chat and event.obj.text.lower() == 'Привет':
                vk.messages.send(
                    chat_id=event.chat_id,
                    random_id=get_random_id(),
                    message='Привет!',
                    reply_to=event.obj.conversation_message_id,
                )
    

    При попытке отправить сообщение получаю ошибку: vk_api.exceptions.ApiError: [100] One of the parameters specified was missing or invalid: reply_to have to be message from same chat

    opened by fojetin 16
  • Add support for downloading Music Albums

    Add support for downloading Music Albums

    Добавил поддержку загрузки альбомов, для них введён отдельный аргумент (как в старой версии API): album_id

    Загрузка по профилю (owner_id) остаётся на месте и всё так же чудесно работает

    Прикрепляю example для теста

    opened by vanyasem 16
  • не работают сообщения в беседе

    не работают сообщения в беседе

    Не получается получить\отправить сообщение в беседу. В лс работает без проблем, а вот в беседах нет. vk.messages.send( #Отправляем сообщение user_id=event.user_id, message='Ваш текст', random_id=random.randint(-2147483648, +2147483648) ) работает, а вот беседы нет: send_message(vk_session, 'chat_id', event.chat_id, message='Держите котиков!', attachment=None) def send_message(vk_session, id_type, id, message=None, attachment=None, keyboard=None): vk_session.method('messages.send',{id_type: id, 'message': message, 'random_id': random.randint(-2147483648, +2147483648), "attachment": attachment, 'keyboard': keyboard})

    opened by misthntism 15
  • Как сделать авторизацию по сервисному ключу

    Как сделать авторизацию по сервисному ключу

    vk_session = vk_api.VkApi(login=login, token='XXXXXXXXXXXXXXX', app_id=62645XX)
    try:
        vk_session.auth(token_only=True)
    except vk_api.AuthError as error_msg:
        print(error_msg)
        return)
    

    В поле токен вставляется сервисный ключ полученный из настроек приложения Выдает: User authorization failed: no access_token passed. Если убрать логин то вообще отказывается авторизовываться Как это все нормально сделать?

    opened by LiberBear 12
  • VkAudioUrlDecodeError

    VkAudioUrlDecodeError

    i get this error:

    File "C:\Users\xxxxx\AppData\Local\Programs\Python\Python36-32\lib\site-packages\vk_api\audio_url_decoder.py", line 44, in decode_audio_url 'Unknown decode cmd: "{}"; Please send bugreport'.format(cmd) vk_api.exceptions.VkAudioUrlDecodeError: Unknown decode cmd: "i"; Please send bugreport

    opened by withoutnameuser 11
  • Получение документов по ID

    Получение документов по ID

    Не могу вытащить документы по ID, в обоих случаях [] В коде ничего не нашел, в документации тоже

    vk = vk_session.get_api()
    doc1 = vk.docs.get_by_id(docs='275003723_473695458')
    doc2 = vk.docs.getById(docs='275003723_473695458')
    
    opened by Loskir 10
  • Unknown error. Please send bugreport: https://vk.com/python273

    Unknown error. Please send bugreport: https://vk.com/python273

    Возникает exception в данном куске кода.

    try:
        self.vk_session.auth()
    except vk_api.AuthError as e:
        logger.critical('%s', e)
    

    При этом продолжает корректно работать.

    vk_api.VkTools(self.vk_session)
    tools = vk_api.VkTools(self.vk_session)
    members = tools.get_all('groups.getMembers', 1000, {'group_id': self.group_id})
    

    Возвращает список подписчиков корректно

    opened by xkord 10
  • Не прикрепляется документ

    Не прикрепляется документ

    Присутствует такая строчка:

    vk_session.method("messages.send", {"chat_id": id, "message": 'testing...', "attachment":'doc508679430_650064261', "random_id": 0})

    Но, несмотря на то, что документ существует, бот его не прикрепляет в сообщении.

    opened by quadratov 0
  • Sanitize json with control characters

    Sanitize json with control characters

    Hi!

    I recently saw that VK seems to be really bad at sanitizing some fields such as usernames. Loading a bunch of members with vk_api yielded an ugly JSONDecodeError: Invalid control character at: line 1 column 68248 (char 68247)

    Inspecting this by hand, I found that the response contains this abomination:

    In [32]: e[68200:68259]
    Out[32]: ',"is_closed":false},{"id":27497241,"nickname":"\x01","domain":'
    

    Of course, <0x01> is not a codepoint that you'd want in a nickname, ever!

    Since the data is nonsensical, not printable and potentially dangerous, my suggestion would be to catch JSONDecodeErrors and try to sanitize the raw content before parsing it with json.loads.

    There are many options for replacing the problematic characters, but regex should be reasonably fast. As a bonus, it allows us to catch control characters as a category (\p{C}) rather than listing them by hand.

    opened by trifle 4
  • Плейлист

    Плейлист

    Добрый день, возможно-ли на данный момент получать аудио с плейлиста по ссылке? Например я хочу сделать бота который будет требовать ссылку на плейлист, затем скачивая плейлист и его воспроизоводить. Надеюсь вы мне ответите

    opened by helldoodle-dev 1
  •  def _vk_login(self, captcha_sid=None, captcha_key=None):

    def _vk_login(self, captcha_sid=None, captcha_key=None):

    Ошибка 429

    У вас большие запросы!

    Точнее, от вашего браузера их поступает слишком много, и сервер ВКонтакте забил тревогу.

    <script>
      (function() {
        Array.prototype.includes||(Array.prototype.includes=function(r){return!!~this.indexOf(r)});
        Array.prototype.forEach||(Array.prototype.forEach=function(r,o){var t,n;if(null==this)throw new TypeError(" this is null or not defined");var e=Object(this),i=e.length>>>0;if("function"!=typeof r)throw new TypeError(r+" is not a function");for(arguments.length>1&&(t=o),n=0;n<i;){var f;n in e&&(f=e[n],r.call(t,f,n,e)),n++}});
        (function(t){var e=function(){try{return!!Symbol.iterator}catch(e){return false}};var r=e();var n=function(t){var e={next:function(){var e=t.shift();return{done:e===void 0,value:e}}};if(r){e[Symbol.iterator]=function(){return e}}return e};var i=function(e){return encodeURIComponent(e).replace(/%20/g,"+")};var o=function(e){return decodeURIComponent(String(e).replace(/\+/g," "))};var a=function(){var a=function(e){Object.defineProperty(this,"_entries",{writable:true,value:{}});var t=typeof e;if(t==="undefined"){}else if(t==="string"){if(e!==""){this._fromString(e)}}else if(e instanceof a){var r=this;e.forEach(function(e,t){r.append(t,e)})}else if(e!==null&&t==="object"){if(Object.prototype.toString.call(e)==="[object Array]"){for(var n=0;n<e.length;n++){var i=e[n];if(Object.prototype.toString.call(i)==="[object Array]"||i.length!==2){this.append(i[0],i[1])}else{throw new TypeError("Expected [string, any] as entry at index "+n+" of URLSearchParams's input")}}}else{for(var o in e){if(e.hasOwnProperty(o)){this.append(o,e[o])}}}}else{throw new TypeError("Unsupported input's type for URLSearchParams")}};var e=a.prototype;e.append=function(e,t){if(e in this._entries){this._entries[e].push(String(t))}else{this._entries[e]=[String(t)]}};e.delete=function(e){delete this._entries[e]};e.get=function(e){return e in this._entries?this._entries[e][0]:null};e.getAll=function(e){return e in this._entries?this._entries[e].slice(0):[]};e.has=function(e){return e in this._entries};e.set=function(e,t){this._entries[e]=[String(t)]};e.forEach=function(e,t){var r;for(var n in this._entries){if(this._entries.hasOwnProperty(n)){r=this._entries[n];for(var i=0;i<r.length;i++){e.call(t,r[i],n,this)}}}};e.keys=function(){var r=[];this.forEach(function(e,t){r.push(t)});return n(r)};e.values=function(){var t=[];this.forEach(function(e){t.push(e)});return n(t)};e.entries=function(){var r=[];this.forEach(function(e,t){r.push([t,e])});return n(r)};if(r){e[Symbol.iterator]=e.entries}e.toString=function(){var r=[];this.forEach(function(e,t){r.push(i(t)+"="+i(e))});return r.join("&")};t.URLSearchParams=a};var s=function(){try{var e=t.URLSearchParams;return new e("?a=1").toString()==="a=1"&&typeof e.prototype.set==="function"&&typeof e.prototype.entries==="function"}catch(e){return false}};if(!s()){a()}var f=t.URLSearchParams.prototype;if(typeof f.sort!=="function"){f.sort=function(){var r=this;var n=[];this.forEach(function(e,t){n.push([t,e]);if(!r._entries){r.delete(t)}});n.sort(function(e,t){if(e[0]<t[0]){return-1}else if(e[0]>t[0]){return+1}else{return 0}});if(r._entries){r._entries={}}for(var e=0;e<n.length;e++){this.append(n[e][0],n[e][1])}}}if(typeof f._fromString!=="function"){Object.defineProperty(f,"_fromString",{enumerable:false,configurable:false,writable:false,value:function(e){if(this._entries){this._entries={}}else{var r=[];this.forEach(function(e,t){r.push(t)});for(var t=0;t<r.length;t++){this.delete(r[t])}}e=e.replace(/^\?/,"");var n=e.split("&");var i;for(var t=0;t<n.length;t++){i=n[t].split("=");this.append(o(i[0]),i.length>1?o(i[1]):"")}}})}})(typeof global!=="undefined"?global:typeof window!=="undefined"?window:typeof self!=="undefined"?self:this);(function(u){var e=function(){try{var e=new u.URL("b","http://a");e.pathname="c d";return e.href==="http://a/c%20d"&&e.searchParams}catch(e){return false}};var t=function(){var t=u.URL;var e=function(e,t){if(typeof e!=="string")e=String(e);if(t&&typeof t!=="string")t=String(t);var r=document,n;if(t&&(u.location===void 0||t!==u.location.href)){t=t.toLowerCase();r=document.implementation.createHTMLDocument("");n=r.createElement("base");n.href=t;r.head.appendChild(n);try{if(n.href.indexOf(t)!==0)throw new Error(n.href)}catch(e){throw new Error("URL unable to set base "+t+" due to "+e)}}var i=r.createElement("a");i.href=e;if(n){r.body.appendChild(i);i.href=i.href}var o=r.createElement("input");o.type="url";o.value=e;if(i.protocol===":"||!/:/.test(i.href)||!o.checkValidity()&&!t){throw new TypeError("Invalid URL")}Object.defineProperty(this,"_anchorElement",{value:i});var a=new u.URLSearchParams(this.search);var s=true;var f=true;var c=this;["append","delete","set"].forEach(function(e){var t=a[e];a[e]=function(){t.apply(a,arguments);if(s){f=false;c.search=a.toString();f=true}}});Object.defineProperty(this,"searchParams",{value:a,enumerable:true});var h=void 0;Object.defineProperty(this,"_updateSearchParams",{enumerable:false,configurable:false,writable:false,value:function(){if(this.search!==h){h=this.search;if(f){s=false;this.searchParams._fromString(this.search);s=true}}}})};var r=e.prototype;var n=function(t){Object.defineProperty(r,t,{get:function(){return this._anchorElement[t]},set:function(e){this._anchorElement[t]=e},enumerable:true})};["hash","host","hostname","port","protocol"].forEach(function(e){n(e)});Object.defineProperty(r,"search",{get:function(){return this._anchorElement["search"]},set:function(e){this._anchorElement["search"]=e;this._updateSearchParams()},enumerable:true});Object.defineProperties(r,{toString:{get:function(){var e=this;return function(){return e.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(e){this._anchorElement.href=e;this._updateSearchParams()},enumerable:true},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,"/")},set:function(e){this._anchorElement.pathname=e},enumerable:true},origin:{get:function(){var e={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol];var t=this._anchorElement.port!=e&&this._anchorElement.port!=="";return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(t?":"+this._anchorElement.port:"")},enumerable:true},password:{get:function(){return""},set:function(e){},enumerable:true},username:{get:function(){return""},set:function(e){},enumerable:true}});e.createObjectURL=function(e){return t.createObjectURL.apply(t,arguments)};e.revokeObjectURL=function(e){return t.revokeObjectURL.apply(t,arguments)};u.URL=e};if(!e()){t()}if(u.location!==void 0&&!("origin"in u.location)){var r=function(){return u.location.protocol+"//"+u.location.hostname+(u.location.port?":"+u.location.port:"")};try{Object.defineProperty(u.location,"origin",{get:r,enumerable:true})}catch(e){setInterval(function(){u.location.origin=r()},100)}}})(typeof global!=="undefined"?global:typeof window!=="undefined"?window:typeof self!=="undefined"?self:this);
        (function(factory){if(typeof exports==="object"){module.exports=factory()}else if(typeof define==="function"&&define.amd){define(factory)}else{var glob;try{glob=window}catch(e){glob=self}glob.SparkMD5=factory()}})(function(undefined){"use strict";var add32=function(a,b){return a+b&4294967295},hex_chr=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function cmn(q,a,b,x,s,t){a=add32(add32(a,q),add32(x,t));return add32(a<<s|a>>>32-s,b)}function md5cycle(x,k){var a=x[0],b=x[1],c=x[2],d=x[3];a+=(b&c|~b&d)+k[0]-680876936|0;a=(a<<7|a>>>25)+b|0;d+=(a&b|~a&c)+k[1]-389564586|0;d=(d<<12|d>>>20)+a|0;c+=(d&a|~d&b)+k[2]+606105819|0;c=(c<<17|c>>>15)+d|0;b+=(c&d|~c&a)+k[3]-1044525330|0;b=(b<<22|b>>>10)+c|0;a+=(b&c|~b&d)+k[4]-176418897|0;a=(a<<7|a>>>25)+b|0;d+=(a&b|~a&c)+k[5]+1200080426|0;d=(d<<12|d>>>20)+a|0;c+=(d&a|~d&b)+k[6]-1473231341|0;c=(c<<17|c>>>15)+d|0;b+=(c&d|~c&a)+k[7]-45705983|0;b=(b<<22|b>>>10)+c|0;a+=(b&c|~b&d)+k[8]+1770035416|0;a=(a<<7|a>>>25)+b|0;d+=(a&b|~a&c)+k[9]-1958414417|0;d=(d<<12|d>>>20)+a|0;c+=(d&a|~d&b)+k[10]-42063|0;c=(c<<17|c>>>15)+d|0;b+=(c&d|~c&a)+k[11]-1990404162|0;b=(b<<22|b>>>10)+c|0;a+=(b&c|~b&d)+k[12]+1804603682|0;a=(a<<7|a>>>25)+b|0;d+=(a&b|~a&c)+k[13]-40341101|0;d=(d<<12|d>>>20)+a|0;c+=(d&a|~d&b)+k[14]-1502002290|0;c=(c<<17|c>>>15)+d|0;b+=(c&d|~c&a)+k[15]+1236535329|0;b=(b<<22|b>>>10)+c|0;a+=(b&d|c&~d)+k[1]-165796510|0;a=(a<<5|a>>>27)+b|0;d+=(a&c|b&~c)+k[6]-1069501632|0;d=(d<<9|d>>>23)+a|0;c+=(d&b|a&~b)+k[11]+643717713|0;c=(c<<14|c>>>18)+d|0;b+=(c&a|d&~a)+k[0]-373897302|0;b=(b<<20|b>>>12)+c|0;a+=(b&d|c&~d)+k[5]-701558691|0;a=(a<<5|a>>>27)+b|0;d+=(a&c|b&~c)+k[10]+38016083|0;d=(d<<9|d>>>23)+a|0;c+=(d&b|a&~b)+k[15]-660478335|0;c=(c<<14|c>>>18)+d|0;b+=(c&a|d&~a)+k[4]-405537848|0;b=(b<<20|b>>>12)+c|0;a+=(b&d|c&~d)+k[9]+568446438|0;a=(a<<5|a>>>27)+b|0;d+=(a&c|b&~c)+k[14]-1019803690|0;d=(d<<9|d>>>23)+a|0;c+=(d&b|a&~b)+k[3]-187363961|0;c=(c<<14|c>>>18)+d|0;b+=(c&a|d&~a)+k[8]+1163531501|0;b=(b<<20|b>>>12)+c|0;a+=(b&d|c&~d)+k[13]-1444681467|0;a=(a<<5|a>>>27)+b|0;d+=(a&c|b&~c)+k[2]-51403784|0;d=(d<<9|d>>>23)+a|0;c+=(d&b|a&~b)+k[7]+1735328473|0;c=(c<<14|c>>>18)+d|0;b+=(c&a|d&~a)+k[12]-1926607734|0;b=(b<<20|b>>>12)+c|0;a+=(b^c^d)+k[5]-378558|0;a=(a<<4|a>>>28)+b|0;d+=(a^b^c)+k[8]-2022574463|0;d=(d<<11|d>>>21)+a|0;c+=(d^a^b)+k[11]+1839030562|0;c=(c<<16|c>>>16)+d|0;b+=(c^d^a)+k[14]-35309556|0;b=(b<<23|b>>>9)+c|0;a+=(b^c^d)+k[1]-1530992060|0;a=(a<<4|a>>>28)+b|0;d+=(a^b^c)+k[4]+1272893353|0;d=(d<<11|d>>>21)+a|0;c+=(d^a^b)+k[7]-155497632|0;c=(c<<16|c>>>16)+d|0;b+=(c^d^a)+k[10]-1094730640|0;b=(b<<23|b>>>9)+c|0;a+=(b^c^d)+k[13]+681279174|0;a=(a<<4|a>>>28)+b|0;d+=(a^b^c)+k[0]-358537222|0;d=(d<<11|d>>>21)+a|0;c+=(d^a^b)+k[3]-722521979|0;c=(c<<16|c>>>16)+d|0;b+=(c^d^a)+k[6]+76029189|0;b=(b<<23|b>>>9)+c|0;a+=(b^c^d)+k[9]-640364487|0;a=(a<<4|a>>>28)+b|0;d+=(a^b^c)+k[12]-421815835|0;d=(d<<11|d>>>21)+a|0;c+=(d^a^b)+k[15]+530742520|0;c=(c<<16|c>>>16)+d|0;b+=(c^d^a)+k[2]-995338651|0;b=(b<<23|b>>>9)+c|0;a+=(c^(b|~d))+k[0]-198630844|0;a=(a<<6|a>>>26)+b|0;d+=(b^(a|~c))+k[7]+1126891415|0;d=(d<<10|d>>>22)+a|0;c+=(a^(d|~b))+k[14]-1416354905|0;c=(c<<15|c>>>17)+d|0;b+=(d^(c|~a))+k[5]-57434055|0;b=(b<<21|b>>>11)+c|0;a+=(c^(b|~d))+k[12]+1700485571|0;a=(a<<6|a>>>26)+b|0;d+=(b^(a|~c))+k[3]-1894986606|0;d=(d<<10|d>>>22)+a|0;c+=(a^(d|~b))+k[10]-1051523|0;c=(c<<15|c>>>17)+d|0;b+=(d^(c|~a))+k[1]-2054922799|0;b=(b<<21|b>>>11)+c|0;a+=(c^(b|~d))+k[8]+1873313359|0;a=(a<<6|a>>>26)+b|0;d+=(b^(a|~c))+k[15]-30611744|0;d=(d<<10|d>>>22)+a|0;c+=(a^(d|~b))+k[6]-1560198380|0;c=(c<<15|c>>>17)+d|0;b+=(d^(c|~a))+k[13]+1309151649|0;b=(b<<21|b>>>11)+c|0;a+=(c^(b|~d))+k[4]-145523070|0;a=(a<<6|a>>>26)+b|0;d+=(b^(a|~c))+k[11]-1120210379|0;d=(d<<10|d>>>22)+a|0;c+=(a^(d|~b))+k[2]+718787259|0;c=(c<<15|c>>>17)+d|0;b+=(d^(c|~a))+k[9]-343485551|0;b=(b<<21|b>>>11)+c|0;x[0]=a+x[0]|0;x[1]=b+x[1]|0;x[2]=c+x[2]|0;x[3]=d+x[3]|0}function md5blk(s){var md5blks=[],i;for(i=0;i<64;i+=4){md5blks[i>>2]=s.charCodeAt(i)+(s.charCodeAt(i+1)<<8)+(s.charCodeAt(i+2)<<16)+(s.charCodeAt(i+3)<<24)}return md5blks}function md5blk_array(a){var md5blks=[],i;for(i=0;i<64;i+=4){md5blks[i>>2]=a[i]+(a[i+1]<<8)+(a[i+2]<<16)+(a[i+3]<<24)}return md5blks}function md51(s){var n=s.length,state=[1732584193,-271733879,-1732584194,271733878],i,length,tail,tmp,lo,hi;for(i=64;i<=n;i+=64){md5cycle(state,md5blk(s.substring(i-64,i)))}s=s.substring(i-64);length=s.length;tail=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(i=0;i<length;i+=1){tail[i>>2]|=s.charCodeAt(i)<<(i%4<<3)}tail[i>>2]|=128<<(i%4<<3);if(i>55){md5cycle(state,tail);for(i=0;i<16;i+=1){tail[i]=0}}tmp=n*8;tmp=tmp.toString(16).match(/(.*?)(.{0,8})$/);lo=parseInt(tmp[2],16);hi=parseInt(tmp[1],16)||0;tail[14]=lo;tail[15]=hi;md5cycle(state,tail);return state}function md51_array(a){var n=a.length,state=[1732584193,-271733879,-1732584194,271733878],i,length,tail,tmp,lo,hi;for(i=64;i<=n;i+=64){md5cycle(state,md5blk_array(a.subarray(i-64,i)))}a=i-64<n?a.subarray(i-64):new Uint8Array(0);length=a.length;tail=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(i=0;i<length;i+=1){tail[i>>2]|=a[i]<<(i%4<<3)}tail[i>>2]|=128<<(i%4<<3);if(i>55){md5cycle(state,tail);for(i=0;i<16;i+=1){tail[i]=0}}tmp=n*8;tmp=tmp.toString(16).match(/(.*?)(.{0,8})$/);lo=parseInt(tmp[2],16);hi=parseInt(tmp[1],16)||0;tail[14]=lo;tail[15]=hi;md5cycle(state,tail);return state}function rhex(n){var s="",j;for(j=0;j<4;j+=1){s+=hex_chr[n>>j*8+4&15]+hex_chr[n>>j*8&15]}return s}function hex(x){var i;for(i=0;i<x.length;i+=1){x[i]=rhex(x[i])}return x.join("")}if(hex(md51("hello"))!=="5d41402abc4b2a76b9719d911017c592"){add32=function(x,y){var lsw=(x&65535)+(y&65535),msw=(x>>16)+(y>>16)+(lsw>>16);return msw<<16|lsw&65535}}if(typeof ArrayBuffer!=="undefined"&&!ArrayBuffer.prototype.slice){(function(){function clamp(val,length){val=val|0||0;if(val<0){return Math.max(val+length,0)}return Math.min(val,length)}ArrayBuffer.prototype.slice=function(from,to){var length=this.byteLength,begin=clamp(from,length),end=length,num,target,targetArray,sourceArray;if(to!==undefined){end=clamp(to,length)}if(begin>end){return new ArrayBuffer(0)}num=end-begin;target=new ArrayBuffer(num);targetArray=new Uint8Array(target);sourceArray=new Uint8Array(this,begin,num);targetArray.set(sourceArray);return target}})()}function toUtf8(str){if(/[\u0080-\uFFFF]/.test(str)){str=unescape(encodeURIComponent(str))}return str}function utf8Str2ArrayBuffer(str,returnUInt8Array){var length=str.length,buff=new ArrayBuffer(length),arr=new Uint8Array(buff),i;for(i=0;i<length;i+=1){arr[i]=str.charCodeAt(i)}return returnUInt8Array?arr:buff}function arrayBuffer2Utf8Str(buff){return String.fromCharCode.apply(null,new Uint8Array(buff))}function concatenateArrayBuffers(first,second,returnUInt8Array){var result=new Uint8Array(first.byteLength+second.byteLength);result.set(new Uint8Array(first));result.set(new Uint8Array(second),first.byteLength);return returnUInt8Array?result:result.buffer}function hexToBinaryString(hex){var bytes=[],length=hex.length,x;for(x=0;x<length-1;x+=2){bytes.push(parseInt(hex.substr(x,2),16))}return String.fromCharCode.apply(String,bytes)}function SparkMD5(){this.reset()}SparkMD5.prototype.append=function(str){this.appendBinary(toUtf8(str));return this};SparkMD5.prototype.appendBinary=function(contents){this._buff+=contents;this._length+=contents.length;var length=this._buff.length,i;for(i=64;i<=length;i+=64){md5cycle(this._hash,md5blk(this._buff.substring(i-64,i)))}this._buff=this._buff.substring(i-64);return this};SparkMD5.prototype.end=function(raw){var buff=this._buff,length=buff.length,i,tail=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],ret;for(i=0;i<length;i+=1){tail[i>>2]|=buff.charCodeAt(i)<<(i%4<<3)}this._finish(tail,length);ret=hex(this._hash);if(raw){ret=hexToBinaryString(ret)}this.reset();return ret};SparkMD5.prototype.reset=function(){this._buff="";this._length=0;this._hash=[1732584193,-271733879,-1732584194,271733878];return this};SparkMD5.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}};SparkMD5.prototype.setState=function(state){this._buff=state.buff;this._length=state.length;this._hash=state.hash;return this};SparkMD5.prototype.destroy=function(){delete this._hash;delete this._buff;delete this._length};SparkMD5.prototype._finish=function(tail,length){var i=length,tmp,lo,hi;tail[i>>2]|=128<<(i%4<<3);if(i>55){md5cycle(this._hash,tail);for(i=0;i<16;i+=1){tail[i]=0}}tmp=this._length*8;tmp=tmp.toString(16).match(/(.*?)(.{0,8})$/);lo=parseInt(tmp[2],16);hi=parseInt(tmp[1],16)||0;tail[14]=lo;tail[15]=hi;md5cycle(this._hash,tail)};SparkMD5.hash=function(str,raw){return SparkMD5.hashBinary(toUtf8(str),raw)};SparkMD5.hashBinary=function(content,raw){var hash=md51(content),ret=hex(hash);return raw?hexToBinaryString(ret):ret};SparkMD5.ArrayBuffer=function(){this.reset()};SparkMD5.ArrayBuffer.prototype.append=function(arr){var buff=concatenateArrayBuffers(this._buff.buffer,arr,true),length=buff.length,i;this._length+=arr.byteLength;for(i=64;i<=length;i+=64){md5cycle(this._hash,md5blk_array(buff.subarray(i-64,i)))}this._buff=i-64<length?new Uint8Array(buff.buffer.slice(i-64)):new Uint8Array(0);return this};SparkMD5.ArrayBuffer.prototype.end=function(raw){var buff=this._buff,length=buff.length,tail=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i,ret;for(i=0;i<length;i+=1){tail[i>>2]|=buff[i]<<(i%4<<3)}this._finish(tail,length);ret=hex(this._hash);if(raw){ret=hexToBinaryString(ret)}this.reset();return ret};SparkMD5.ArrayBuffer.prototype.reset=function(){this._buff=new Uint8Array(0);this._length=0;this._hash=[1732584193,-271733879,-1732584194,271733878];return this};SparkMD5.ArrayBuffer.prototype.getState=function(){var state=SparkMD5.prototype.getState.call(this);state.buff=arrayBuffer2Utf8Str(state.buff);return state};SparkMD5.ArrayBuffer.prototype.setState=function(state){state.buff=utf8Str2ArrayBuffer(state.buff,true);return SparkMD5.prototype.setState.call(this,state)};SparkMD5.ArrayBuffer.prototype.destroy=SparkMD5.prototype.destroy;SparkMD5.ArrayBuffer.prototype._finish=SparkMD5.prototype._finish;SparkMD5.ArrayBuffer.hash=function(arr,raw){var hash=md51_array(new Uint8Array(arr)),ret=hex(hash);return raw?hexToBinaryString(ret):ret};return SparkMD5});
        /*! js-cookie v3.0.1 | MIT */
        !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self,function(){var n=e.Cookies,o=e.Cookies=t();o.noConflict=function(){return e.Cookies=n,o}}())}(this,(function(){"use strict";function e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)e[o]=n[o]}return e}return function t(n,o){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=e({},o,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var c="";for(var u in i)i[u]&&(c+="; "+u,!0!==i[u]&&(c+="="+i[u].split(";")[0]));return document.cookie=t+"="+n.write(r,t)+c}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var t=document.cookie?document.cookie.split("; "):[],o={},r=0;r<t.length;r++){var i=t[r].split("="),c=i.slice(1).join("=");try{var u=decodeURIComponent(i[0]);if(o[u]=n.read(c,u),e===u)break}catch(e){}}return e?o[e]:o}},remove:function(t,n){r(t,"",e({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,e({},this.attributes,n))},withConverter:function(n){return t(e({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(o)},converter:{value:Object.freeze(n)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}));
        /*! (c) Andrea Giammarchi - ISC */
        var self=this||{};try{!function(t,e){if(new t("q=%2B").get("q")!==e||new t({q:e}).get("q")!==e||new t([["q",e]]).get("q")!==e||"q=%0A"!==new t("q=\n").toString()||"q=+%26"!==new t({q:" &"}).toString()||"q=%25zx"!==new t({q:"%zx"}).toString())throw t;self.URLSearchParams=t}(URLSearchParams,"+")}catch(t){!function(t,a,o){"use strict";var u=t.create,h=t.defineProperty,e=/[!'\(\)~]|%20|%00/g,n=/%(?![0-9a-fA-F]{2})/g,r=/\+/g,i={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"},s={append:function(t,e){p(this._ungap,t,e)},delete:function(t){delete this._ungap[t]},get:function(t){return this.has(t)?this._ungap[t][0]:null},getAll:function(t){return this.has(t)?this._ungap[t].slice(0):[]},has:function(t){return t in this._ungap},set:function(t,e){this._ungap[t]=[a(e)]},forEach:function(e,n){var r=this;for(var i in r._ungap)r._ungap[i].forEach(t,i);function t(t){e.call(n,t,a(i),r)}},toJSON:function(){return{}},toString:function(){var t=[];for(var e in this._ungap)for(var n=v(e),r=0,i=this._ungap[e];r<i.length;r++)t.push(n+"="+v(i[r]));return t.join("&")}};for(var c in s)h(f.prototype,c,{configurable:!0,writable:!0,value:s[c]});function f(t){var e=u(null);switch(h(this,"_ungap",{value:e}),!0){case!t:break;case"string"==typeof t:"?"===t.charAt(0)&&(t=t.slice(1));for(var n=t.split("&"),r=0,i=n.length;r<i;r++){var a=(s=n[r]).indexOf("=");-1<a?p(e,g(s.slice(0,a)),g(s.slice(a+1))):s.length&&p(e,g(s),"")}break;case o(t):for(var s,r=0,i=t.length;r<i;r++){p(e,(s=t[r])[0],s[1])}break;case"forEach"in t:t.forEach(l,e);break;default:for(var c in t)p(e,c,t[c])}}function l(t,e){p(this,e,t)}function p(t,e,n){var r=o(n)?n.join(","):n;e in t?t[e].push(r):t[e]=[r]}function g(t){return decodeURIComponent(t.replace(n,"%25").replace(r," "))}function v(t){return encodeURIComponent(t).replace(e,d)}function d(t){return i[t]}self.URLSearchParams=f}(Object,String,Array.isArray)}!function(d){var r=!1;try{r=!!Symbol.iterator}catch(t){}function t(t,e){var n=[];return t.forEach(e,n),r?n[Symbol.iterator]():{next:function(){var t=n.shift();return{done:void 0===t,value:t}}}}"forEach"in d||(d.forEach=function(n,r){var i=this,t=Object.create(null);this.toString().replace(/=[\s\S]*?(?:&|$)/g,"=").split("=").forEach(function(e){!e.length||e in t||(t[e]=i.getAll(e)).forEach(function(t){n.call(r,t,e,i)})})}),"keys"in d||(d.keys=function(){return t(this,function(t,e){this.push(e)})}),"values"in d||(d.values=function(){return t(this,function(t,e){this.push(t)})}),"entries"in d||(d.entries=function(){return t(this,function(t,e){this.push([e,t])})}),!r||Symbol.iterator in d||(d[Symbol.iterator]=d.entries),"sort"in d||(d.sort=function(){for(var t,e,n,r=this.entries(),i=r.next(),a=i.done,s=[],c=Object.create(null);!a;)e=(n=i.value)[0],s.push(e),e in c||(c[e]=[]),c[e].push(n[1]),a=(i=r.next()).done;for(s.sort(),t=0;t<s.length;t++)this.delete(s[t]);for(t=0;t<s.length;t++)e=s[t],this.append(e,c[e].shift())}),function(f){function l(t){var e=t.append;t.append=d.append,URLSearchParams.call(t,t._usp.search.slice(1)),t.append=e}function p(t,e){if(!(t instanceof e))throw new TypeError("'searchParams' accessed on an object that does not implement interface "+e.name)}function t(e){var n,r,i,t=e.prototype,a=v(t,"searchParams"),s=v(t,"href"),c=v(t,"search");function o(t,e){d.append.call(this,t,e),t=this.toString(),i.set.call(this._usp,t?"?"+t:"")}function u(t){d.delete.call(this,t),t=this.toString(),i.set.call(this._usp,t?"?"+t:"")}function h(t,e){d.set.call(this,t,e),t=this.toString(),i.set.call(this._usp,t?"?"+t:"")}!a&&c&&c.set&&(i=c,r=function(t,e){return t.append=o,t.delete=u,t.set=h,g(t,"_usp",{configurable:!0,writable:!0,value:e})},n=function(t,e){return g(t,"_searchParams",{configurable:!0,writable:!0,value:r(e,t)}),e},f.defineProperties(t,{href:{get:function(){return s.get.call(this)},set:function(t){var e=this._searchParams;s.set.call(this,t),e&&l(e)}},search:{get:function(){return c.get.call(this)},set:function(t){var e=this._searchParams;c.set.call(this,t),e&&l(e)}},searchParams:{get:function(){return p(this,e),this._searchParams||n(this,new URLSearchParams(this.search.slice(1)))},set:function(t){p(this,e),n(this,t)}}}))}var g=f.defineProperty,v=f.getOwnPropertyDescriptor;try{t(HTMLAnchorElement),/^function|object$/.test(typeof URL)&&URL.prototype&&t(URL)}catch(t){}}(Object)}(self.URLSearchParams.prototype,Object);
    
        var langKeys = {
          en: {
            title: 'Error 429',
            heading: 'You’re requesting a lot!',
            description: 'Or rather, your browser is sending too many requests, and the VK server has sounded the alarm.',
            teleport: 'Teleporting back in&nbsp;5&nbsp;seconds.',
            https: "This page was downloaded by HTTP instead of secure HTTP<strong>S</strong>, which means it won't teleport back.<br/>Contact the service support.",
            cookies: 'You disabled Cookies but you need them to resolve the problem.',
            hash429: "For some reason the page didn't get all the data, and it doesn't work without it.<br/>Contact the service support."
          }
        };
    
        document.querySelector('#description').classList.add('hidden');
        setTimeout(() => {
          document.querySelector('#description').classList.remove('hidden');
        }, 1200);
    
        function show (langKey) {
          document.querySelector('[data-lang-key="'+ langKey +'"]').classList.remove('hidden');
        }
    
        if (!navigator.languages.includes('ru')) {
          var lang = langKeys.en;
          document.querySelector('html').setAttribute('lang', 'en');
          Object.keys(lang).forEach(function(key) {
            document.querySelectorAll('[data-lang-key='+ key +']').forEach(function(el){
              el.innerHTML = lang[key];
            });
          });
        }
    
        var WAF_CHECK_RESPONSE_STATUS = 429;
        var WAF_CHECK_RESPONSE_SOURCE = '429.html';
        var WAF_TIMEOUT = 0;
        var COOKIE_SUPPORT_NAME = '__cookie-check__';
    
        if (window.self !== window.top) {
          window.top.postMessage({
            action: 'use_meta',
            type: 'frame_transport',
            data: {
              status: WAF_CHECK_RESPONSE_STATUS,
              source: WAF_CHECK_RESPONSE_SOURCE,
            }
          }, '*')
        }
    
        if (window.location.protocol !== 'https:') {
          show('https');
          return;
        }
    
        var url = new URL(window.location.href);
        var hash429 = url.searchParams.get('hash429');
    
        if (!hash429) {
          Cookies.set(COOKIE_SUPPORT_NAME, 'ok');
          var isCookiesSupported = Cookies.get(COOKIE_SUPPORT_NAME) === 'ok';
          Cookies.remove(COOKIE_SUPPORT_NAME);
    
          if (!isCookiesSupported) {
            show('cookies');
            return;
          }
          hash429 = Cookies.get('hash429');
        }
    
        setTimeout(function () {
          if (hash429 && typeof hash429 === 'string') {
            if (url.searchParams.has('key')) {
              url.searchParams.set('key', SparkMD5.hash(hash429));
            } else {
              url.searchParams.append('key', SparkMD5.hash(hash429));
            }
            show('teleport');
            window.location.replace(url.href);
            return;
          }
    
          show('hash429');
        }, WAF_TIMEOUT);
      })();
    </script>
    
    opened by m0v34x 2
  • Перестала работать загрузка видео vk_upload.video

    Перестала работать загрузка видео vk_upload.video

    С 15 июня перестала работать загрузка видеозаписей, ругается на SSL-сертификат.

    vk_upload.video(video_file=video_file, name=title, group_id=group_id, description=description)
    

    Похоже, что проблема появляется на этапе отправки POST-запроса.

    HTTPSConnectionPool(host='ovu.mycdn.me', port=443): Max retries exceeded with url: /upload.do?sig=... (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)')))

    opened by novikalexy 1
Releases(v11.9.9)
  • v11.9.9(Jun 25, 2022)

  • v11.9.8(May 1, 2022)

  • v11.9.7(Dec 7, 2021)

  • v11.9.6(Nov 2, 2021)

  • v11.9.5(Oct 27, 2021)

  • v11.9.4(May 19, 2021)

  • v11.9.3(Apr 29, 2021)

  • v11.9.2(Apr 29, 2021)

    • Исправлена аутентификация
    • VkTools.get_all_iter теперь показывает текст ошибки запросов
    Source code(tar.gz)
    Source code(zip)
  • v11.9.1(Nov 19, 2020)

    • Исправлена двухфакторная аутентификация

    https://github.com/python273/vk_api/compare/v11.9.0...v11.9.1

    Source code(tar.gz)
    Source code(zip)
  • v11.9.0(Sep 11, 2020)

    С этой версии поддерживаются только Python 3.6+

    https://github.com/python273/vk_api/compare/v11.8.0...v11.9.0

    Source code(tar.gz)
    Source code(zip)
  • v11.8.0(Mar 16, 2020)

  • v11.7.0(Jan 25, 2020)

    VkAudio

    • Добавлена функция get_post_audio (@qwertyadrian)
    • Небольшие фиксы для получения cookies

    VkUpload

    • Добавлен параметр peer_id для photo_messages (@Raportuy)
    Source code(tar.gz)
    Source code(zip)
  • v11.6.1(Nov 25, 2019)

    VkBotLongPoll

    • VkBotEvent обновлен для версии 5.103. Добавлены поля: client_info, message (@BrokenFG & @nedogimov)

    VkAudio

    • Исправлено получение id и ссылки на mp3 (@bakatrouble)
    Source code(tar.gz)
    Source code(zip)
  • v11.6.0(Oct 30, 2019)

  • v11.5.1(Sep 29, 2019)

    VkApi

    • Исправлена двухфакторная аутентификация

    VkUpload

    • Добавлена функция photo_market (@MrRozdor)
    • Добавлена функция photo_market_album (@MrRozdor)
    Source code(tar.gz)
    Source code(zip)
  • v11.5.0(Jul 7, 2019)

    VkApi

    • Добавлен параметр session для передачи кастомной requests сессии (до этого можно было обновлять через поле http) (@sakost)

    VkKeyboard

    • Добавлены новые типы кнопок: add_location_button, add_vkpay_button add_vkapps_button (@prostomarkeloff)

    VkUpload

    • Добавлена функция photo_group_widget (@qulaz)
    • Добавлен параметр caption для photo_wall (@manuelcortez)

    VkLongPoll

    • Исправлена передача VkLongpollMode в параметр mode (@snowwm)
    • Добавлен параметр group_id (@snowwm)
    • Добавлено поле message в Event (@snowwm)

    VkStreaming

    • Добавлена функция delete_all_rules (@digital-stars)

    etc.

    • enum34 устанавливается только на версии python < 3.4 (@snowwm)
    • Добавлен пример бота через callbacks: examples/callback_bot.py (@prostomarkeloff)
    • Добавлен пример для VkStreaming examples/streaming.py (@digital-stars)
    Source code(tar.gz)
    Source code(zip)
  • v11.4.0(Jan 29, 2019)

    • Добавлена utils.get_random_id для метода messages.send
    • Добавлена VkApi.code_auth для получения токена по коду при авторизации на сайте
    • Добавлена возможность передавать list/tuple в аргументах VkApiMethod (VkApi.get_api()), который конвертруется в строку [1,2,3] -> '1,2,3'
    • [VkAudio] Добавлена возможность получать альбомы с access_hash
    • [VkAudio] Добавлена VkAudio.get_audio_by_id
    • [VkUpload] Добавлена возможность передавать VkApiMethod
    Source code(tar.gz)
    Source code(zip)
  • v11.3.0(Nov 23, 2018)

    • Дефолтная версия API 5.92
    • [VkLongPoll] Исправлена обработка неизвестных событий
    • [VkLongPoll] Добавлено событие записи аудиосообщения (VkEventType.USER_RECORDING_VOICE)

    thx @Helow19274

    Source code(tar.gz)
    Source code(zip)
  • v11.2.1(Oct 4, 2018)

  • v11.2.0(Oct 2, 2018)

    • Дефолтная версия API 5.85
    • Исправлены проблемы с установкой из-за кодировки
    • VkLongPoll теперь использует 3 версию longpoll, изменения в событиях связанными с сообщениями
    • Исправлен скрапинг VkAudio
    • VkAudio.search_user теперь возвращает только аудио пользователя
    • VkAudio.get_albums & VkAudio.get_albums_iter теперь возвращают правильное кол-во прослушиваний (plays)

    thx @Helow19274

    Source code(tar.gz)
    Source code(zip)
  • v11.1.0(Sep 17, 2018)

    • [VkBotLongPoll] Добавлено событие VkBotEventType.VKPAY_TRANSACTION (vkpay_transaction)

    • [VkLongPoll] Добавлены Event.update_type для события VkEventType.CHAT_UPDATE:

      • VkChatEventType.SETTINGS_CHANGED (4) (Изменены настройки беседы)
      • VkChatEventType.KEYBOARD_RECEIVED (11) (получение клавиатуры от бота)
    • Исправлено событие VkEventType.NOTIFICATION_SETTINGS_UPDATE

    • Обновление версии API до 5.84

    thx @Helow19274

    Source code(tar.gz)
    Source code(zip)
  • v11.0.0(Aug 8, 2018)

    • Добавлен VkBotLongPoll (doc) @deker104
    • Добавлен VkKeyboard (doc) @Helow19274
    • Добавлен VkStreaming (doc) @hdk5
    • Заменен метод VkRequestsPoll.method_one_param на функцию vk_request_one_param_pool
    • Изменена VkAudio.search
    Source code(tar.gz)
    Source code(zip)
  • v10.1(May 15, 2018)

  • v10.0(Apr 14, 2018)

    Много PRs от @hdk5:

    • Исправлен и переделан VkTools
    • Добавлена возможность получать аудио альбомы
    • Добавлена документация на Sphinx: https://vk-api.readthedocs.io/en/latest/
    • Рефакторинг

    Миграция:

    • Изменено API VkAudio
    • Изменено API VkLongpoll
    • Изменено API VkApi: некоторые методы стали приватными
    Source code(tar.gz)
    Source code(zip)
  • v9.3.2(Mar 18, 2018)

    • Добавлена возможность загружать истории: VkUpload.story (Спасибо @hdk5)
    • Исправлено декодирование ссылок аудио (VkAudio) для python2 (Спасибо @mrandybu)
    Source code(tar.gz)
    Source code(zip)
  • v9.3.1(Mar 5, 2018)

    • Исправлена ошибка для заблокированных аккаунтов
    • Обновлена версия API до 5.73
    • Добавлен stories в стандартный scope
    Source code(tar.gz)
    Source code(zip)
  • v9.3(Nov 24, 2017)

    • Исправлено декодирование ссылок аудио для VkAudio
    • Исправлена фильтрация недоступных аудио
    Source code(tar.gz)
    Source code(zip)
  • v9.2.1(Nov 18, 2017)

    • Добавлен аргумент stop_fn для VkTools.get_all*
    • Исправлен тип Event.user_id лонгпулла
    • Добавлено получение альбомов и аудио из альбомов в VkAudio
    Source code(tar.gz)
    Source code(zip)
  • v9.1(Sep 8, 2017)

    • Добавлен vk_api.utils.enable_debug_mode (перенаправляет логгирование в консоль и выводит все http запросы)
    • Добавлен обход рекапчи при логине
    • Исправлено декодирование ссылок на аудио
    Source code(tar.gz)
    Source code(zip)
  • v9.0(Aug 7, 2017)

    Тысячи часов рефакторина и ломания обратной совместимости. Ставьте звездочки на дошираки автору

    Чтобы мигрировать с 8.* на 9.0 нужно:

    • Заменить вызов VkApi.authorization на VkApi.auth (vk.authorization() на vk.auth())
    • Заменить AuthorizationError на AuthError
    • Удалить использования аргументов VkApi.__init__: number, sec_number, proxies Вместо number, sec_number просто передавайте номер в login Прокси можно по прежнему установить как в примере
    • (Опционально) Удалить старый конфиг vk_config.json

    Изменения:

    • Добавлен base класс для конфига (#76)
    • Добавлена возможность вызывать VkApi.auth без пароля - будут использоваться данные из конфига
    • Изменен формат конфига:
    1. Токены с разным app_id и scope сохраняются отдельно - не нужно вызывать VkApi.auth(reauth=True) чтобы получить токен с новым app_id или scope
    2. Куки сохраняются со всей информацией (чтобы защитить куки от отправки на сторонние домены)
    • Удалены параметры VkApi.__init__: number, sec_number, proxies
    • Добавлено логгирование
    • Удален VkApi.authorization
    • Добавлены доки (генерируются из docstring)
    • Исправлена передача аргумента raw при вызове try_again() из ошибки
    • Добавлен VkUpload.photo_cover (@kamidorik)
    • Добавлена возможность вызывать методы с snake case: vk.wall.get_by_id(...)
    Source code(tar.gz)
    Source code(zip)
This Code is Property of Rehyann Saini. Feel Free to use this Project.

Email-Spammer Rehyann Saini in Collabration With Fe13 Productions This is an easy to use Dev Friendly Email spammer... #Important Things to know..! St

Rehyann Saini 1 Jan 14, 2022
The Social-Engineer Toolkit (SET) is specifically designed to perform advanced attacks against the human element.

The Social-Engineer Toolkit (SET) The Social-Engineer Toolkit (SET) is specifically designed to perform advanced attacks against the human element. SE

Professor 6 Nov 28, 2022
Tools ini hanya bisa digunakan untuk menyerang website atau http/s

☢️ Tawkun DoS ☢️ Tools ini hanya bisa digunakan untuk menyerang website atau http/s FITUR: [ ☯️ ] Proxy Mode [ 🔥 ] SOCKS Mode | Kadang Eror [ ☢️ ] Ht

Bandhitawkunthi 9 Jul 19, 2022
A curated list of awesome Amazon Web Services (AWS) libraries, open source repos, guides, blogs, and other resources.

A curated list of awesome Amazon Web Services (AWS) libraries, open source repos, guides, blogs, and other resources. Featuring the Fiery Meter of AWSome.

Donne Martin 11.1k Jan 04, 2023
Python SDK for Thepeer

Python SDK for Thepeer

Oluwafemi Tairu 2 Dec 22, 2021
Autofilter with imdb bot || broakcast , imdb poster and imdb rating

LuciferMoringstar_Robot How To Deploy Video Subscribe YouTube Channel Added Features Imdb posters for autofilter. Imdb rating for autofilter. Custom c

Muhammed 127 Dec 29, 2022
Free TradingView webhook alert for basic plan users.

TradingView-Free-Webhook-Alerts Project start on 01-02-2022 Providing the free webhook service to the basic plan users in TradingView. Portal ↠ Instal

Freeman 31 Dec 25, 2022
A suite of utilities for AWS Lambda Functions that makes tracing with AWS X-Ray, structured logging and creating custom metrics asynchronously easier

A suite of utilities for AWS Lambda Functions that makes tracing with AWS X-Ray, structured logging and creating custom metrics asynchronously easier

Amazon Web Services - Labs 1.9k Jan 07, 2023
This bot will send you an email or notify you via telegram & discord if dolar/lira parity breaks a record.

Dolar Rekor Kırdı Mı? This bot will send you an email or notify you via Telegram & Discord if Dolar/Lira parity breaks a record. Mailgun can be used a

Yiğit Göktuğ Budanur 2 Oct 14, 2021
Efetuar teste de automação usando linguagem gherkin

🚀 Teste-de-Automação - QA---CI-T 🚀 Descrição • Primeira Parte • Segunda Parte • Terceira Parte Contributors Descrição Efetuamos testes de automação

Eliel martins 6 Dec 07, 2021
Discondelete, is a Discord self-bot to delete dm's or purge all messages from a guild.

Discondelete Discondelete, is a Discord self-bot to delete dm's or purge all messages from a guild. Report Bug · Request Feature Table of Contents Abo

core 4 Feb 28, 2022
Process your transactions from etherscan (and other forks) into excel file for easier manipulation.

DEGEN TRACKER Read first This is my first Python open source project and it is very likely full of bad practices and security issues. You should not u

1 Oct 13, 2022
A demo titiler for Sentinel 2 Digital Twin dataset

This is a DEMO custom api built on top of TiTiler to create Web Map Tiles from the Digital Twin Sentinel-2 COG created by Sinergise

Development Seed 26 May 21, 2022
Isobot is originally made by notsniped. This is a remix of iso.bot by archisha.

iso6.9-1.2beta iso.bot is originally made by notsniped#0002. This is a remix of iso.bot by αrchιshα#5518. iso6.9 is a Discord bot written in Python an

Kamilla Youver 3 Jan 11, 2022
ShotsGram - For sending captures from your monitor to a telegram chat (robot)

ShotsGram pt-BR Envios de capturas do seu monitor para um chat do telegram. Essa

Carlos Alberto 1 Apr 24, 2022
Discord bots that update their status to the price of any coin listed on x.vite.net

Discord bots that update their status to the price of any coin listed on x.vite.net

5am 3 Nov 27, 2022
Louis Manager Bot With Python

✨ Natsuki ✨ Are You Okay Baby I'm Natsuki Unmaintained. The new repo of @TheNatsukiBot is public. ⚡ (It is no longer based on this source code. The co

Team MasterXBots 1 Nov 07, 2021
A template that help you getting started with Pycord.

A Pycord Template with some example! Getting Started: Clone this repository using git clone https://github.com/AungS8430/pycord-template.git If you ha

2 Feb 10, 2022
A Telegram Bot which will ask new Group Members to verify them by solving an emoji captcha.

Emoji-Captcha-Bot A Telegram Bot which will ask new Group Members to verify them by solving an emoji captcha. About API: Using api.abirhasan.wtf/captc

Abir Hasan 52 Dec 11, 2022
WeChat SDK for Python

___ __ _______ ________ ___ ___ ________ _________ ________ ___ ___ |\ \ |\ \|\ ___ \ |\ ____\|\ \|\ \|\ __ \|\___

wechatpy 3.3k Dec 26, 2022