Closed arzaev closed 5 years ago
Can you post the contents of the iq_element
?
<iq id="7de3c4f2-2a10-4b9b-9618-25422ab2b787" type="result"><query xmlns:="jabber:iq:register"><node>testqq1_1d9</node><email confirmed="false">testqq@gmail.com</email><username>TestQq1</username><first>TestQq1</first><last>TestQq1</last><xdata><record pk="ab_settings">CAAYAQ</record><record pk="one_time_use_records">CAAgACgAMAA4AEgAUABYAGIAeACQAQCYAQE</record><record pk="scanning_nonce_secret">CoACrE3bRphiUa5F8iaTnYglg80_CLS4rQ_7uWnljG4w6gRQ0RlgTvpfjzchVqFAD4TESOy093bKkmnxxX98zWmt341sZNqnXojXkOt5odYGuLOWiWZR8UXeKnS0mWfQiovsptx8VMynV71TxiZWSK94N6huNFTnrqf9AcVIIHr3PgHot_PrnZ1rxaXP3Z8ivbCsBjgjyvHN2BGqAeJp1qItKHf7m2mV8SOptdvfyX_X6wVrXcuAipedQ_0uZyzoKYhSvpeMLiUYBGpX1FU0-CSWAHHauuAIac2Rf92OEiP6MnM-8dt6Du9PD4ZYYlIyA4DIrwdxMChK38d-iERxUFQ8dQ</record><record pk="user_preferences">UABYBmgB</record></xdata><xiphias><response method="GetParticipatingExperiments" service="mobile.abtesting.v1.AbTesting"><body> so long body here </body></response></xiphias></query></iq>
if you mean it
None of the examples work for me. I get the KeyError: 'xmlns' on every non legacy example.
At which step this is happening? What is the request?
Hey,
Here's the output of the example scripts.
Running register_client.py:
Username: someusername12345 Password: somepassword12345 First name: some Last name: 12345 Email: some12345@email.com Birthday: (like 01-01-1990): 01-01-1990 [2019-08-06 20:06:53,777] INFO (thread Kik Connection): [+] Initiating the Kik Connection thread and connecting to kik server... [2019-08-06 20:06:53,778] INFO (thread MainThread): [+] Sending sign up request (name: some 12345, email: some12345@email.com)... [2019-08-06 20:06:53,784] DEBUG (thread MainThread): [!] Waiting for connection. [2019-08-06 20:06:53,885] DEBUG (thread MainThread): [!] Waiting for connection. [2019-08-06 20:06:53,986] DEBUG (thread MainThread): [!] Waiting for connection. [2019-08-06 20:06:54,086] DEBUG (thread MainThread): [!] Waiting for connection. [2019-08-06 20:06:54,187] DEBUG (thread MainThread): [!] Waiting for connection. [2019-08-06 20:06:54,288] DEBUG (thread MainThread): [!] Waiting for connection. [2019-08-06 20:06:54,316] INFO (thread Kik Connection): [!] Connected. [2019-08-06 20:06:54,317] DEBUG (thread Kik Connection): [+] Sending raw data: b'<k anon="">' [2019-08-06 20:06:54,319] DEBUG (thread Kik Connection): [!] Running main loop [2019-08-06 20:06:54,388] DEBUG (thread MainThread): [!] Waiting for connection. [2019-08-06 20:06:54,430] DEBUG (thread Kik Connection): [+] Received raw data: b'<k ok="1">' [2019-08-06 20:06:54,819] DEBUG (thread Kik Connection): [+] Sending raw data: b'<iq type="set" id="acc9e926-4799-4e5b-b81e-0a1280df0d99"><query xmlns="jabber:iq:register"><email>some12345@email.com</email><passkey-e>15c1e056151c78ff6c1cc623eed0fd94</passkey-e><passkey-u>0a1c1e6d57f0680372d456ddd924dee4</passkey-u><device-id>62030843678b7376a707ca3d11e87837</device-id><username>someusername12345</username><first>some</first><last>12345</last><birthday>01-01-1990</birthday><version>14.5.0.13136</version><device-type>android</device-type><model>Nexus 7</model><android-sdk>25</android-sdk><registrations-since-install>1</registrations-since-install><install-date>unknown</install-date><logins-since-install>0</logins-since-install><prefix>CAN</prefix><lang>en_US</lang><brand>google</brand><android-id>849d4ffb0c020de7</android-id></query></iq>' [2019-08-06 20:06:54,925] DEBUG (thread Kik Connection): [+] Received raw data: b'<ack id="acc9e926-4799-4e5b-b81e-0a1280df0d99"/>' [2019-08-06 20:06:55,032] DEBUG (thread Kik Connection): [+] Received raw data: b'<iq type="error" id="acc9e926-4799-4e5b-b81e-0a1280df0d99"><query xmlns="jabber:iq:register"><email>some12345@email.com</email><passkey-e>15c1e056151c78ff6c1cc623eed0fd94</passkey-e><passkey-u>0a1c1e6d57f0680372d456ddd924dee4</passkey-u><device-id>62030843678b7376a707ca3d11e87837</device-id><username>someusername12345</username><first>some</first><last>12345</last><birthday>01-01-1990</birthday><version>14.5.0.13136</version><device-type>android</device-type><model>Nexus 7</model><android-sdk>25</android-sdk><registrations-since-install>1</registrations-since-install><install-date>unknown</install-date><logins-since-install>0</logins-since-install><prefix>CAN</prefix><lang>en_US</lang><brand>google</brand><android-id>849d4ffb0c020de7</android-id></query><error type="modify" code="406"><not-acceptable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><challenge xmlns="kik:challenge"><captcha-url>https://captcha.kik.com/?id=3-CAISiAEpZ64GEuprxwSOFt3M8nzHkGmNXvbPS8cXy8ysCXDM3azTDjQPPkX1djWMVNmWoiYvYMc07o_oImcN57LC4fWZ6ffQc41EcIYIvv6qTMlbzPW4IeGy2Qj-1LSIJVAruNcRV5sIYtk3I3XYuGxfFwXzOaN62eCXPVdEmedzAAh2p4PXcOum43KGGhBph_nByJ6GRa4-08kbD8tsIiWvQkGWRri94Fr2R2NWMAGpHiesaMGGp5B8hPGzc-qF6ZqFVUr0KhAoXLmm57zEs0O0ia7T7sBg&lang=en</captcha-url></challenge></error></iq>' Exception in callback KikClient._on_new_data_received(b'<iq type="e...</error></iq>') handle: <Handle KikClient._on_new_data_received(b'<iq type="e...</error></iq>')> Traceback (most recent call last): File "/usr/lib/python3.6/asyncio/events.py", line 145, in _run self._callback(*self._args) File "/home/maurits/.local/lib/python3.6/site-packages/kik_unofficial/client.py", line 492, in _on_new_data_received self._handle_received_iq_element(xml_element) File "/home/maurits/.local/lib/python3.6/site-packages/kik_unofficial/client.py", line 528, in _handle_received_iq_element self._handle_xmlns(iq_element.query['xmlns'], iq_element) File "/home/maurits/.local/lib/python3.6/site-packages/bs4/element.py", line 971, in __getitem__ return self.attrs[key] KeyError: 'xmlns'
running interactive_client.py:
[2019-08-06 20:13:00,740] INFO (thread Kik Connection): [+] Initiating the Kik Connection thread and connecting to kik server... [2019-08-06 20:13:01,268] INFO (thread Kik Connection): [!] Connected. [2019-08-06 20:13:01,269] DEBUG (thread Kik Connection): [+] Sending raw data: b'<k anon="">' [2019-08-06 20:13:01,271] DEBUG (thread Kik Connection): [!] Running main loop [2019-08-06 20:13:01,385] DEBUG (thread Kik Connection): [+] Received raw data: b'<k ok="1">' [2019-08-06 20:13:01,389] INFO (thread Kik Connection): [+] Logging in with username 'oopsiefloopsie' and a given password... [2019-08-06 20:13:01,558] DEBUG (thread Kik Connection): [+] Sending raw data: b'<iq type="set" id="4ae1f850-2764-4904-944f-1174c5a9d3bd"><query xmlns="jabber:iq:register"><username>oopsiefloopsie</username><passkey-u>65ba21a8c969b465697aa1481f54e08a</passkey-u><device-id>62030843678b7376a707ca3d11e87837</device-id><install-referrer>utm_source=google-play&utm_medium=organic</install-referrer><operator>310260</operator><install-date>1494078709023</install-date><device-type>android</device-type><brand>generic</brand><logins-since-install>1</logins-since-install><version>14.5.0.13136</version><lang>en_US</lang><android-sdk>19</android-sdk><registrations-since-install>0</registrations-since-install><prefix>CAN</prefix><android-id>849d4ffb0c020de7</android-id><model>Samsung Galaxy S5 - 4.4.4 - API 19 - 1080x1920</model></query></iq>' [2019-08-06 20:13:01,679] DEBUG (thread Kik Connection): [+] Received raw data: b'<ack id="4ae1f850-2764-4904-944f-1174c5a9d3bd"/>' [2019-08-06 20:13:01,784] DEBUG (thread Kik Connection): [+] Received raw data: b'<iq id="4ae1f850-2764-4904-944f-1174c5a9d3bd" type="result"><query xmlns="jabber:iq:register"><node>oopsiefloopsie_nf2</node><email confirmed="false">whoopsiefloopsie@mail.com</email><username>oopsiefloopsie</username><first>Oopsie</first><last>Floopsie</last><xdata><record pk="ab_settings">CAAYAQ</record><record pk="chat_list_bins">CgsKCQoHa2lrdGVhbQ</record><record pk="one_time_use_records">mAEA</record><record pk="scanning_nonce_secret">CoACuzCnJAX7if-LaeHiSwlnMZS3X9xDxcTIDDjQqQJaPolhefippdDD4RmfY3or8HHkPlfUiWQXDkobRadkLQOO3vzXrK2WJda0sONn1AR0DxH4Kw5zVkeLWX-wtHaRyZllZ1fJdc1fvT56r6-ryhXlL93J2zrQ7cry4HiWk71X5QMEoRRbWNNmAce0OTPdhnLHVuMeYAA-Ey7ziIH58kHn4rDpXQljfBD-YFlkuIV6GLueZnR9K0H5CjO-_bXcRFnTxj1PFD86PBTK_ww9kYlGekk7QayYWUQ9KD97GkVFiLZcyhFlwvVj7A5p7HU9dl8qbBAPy6tA16zOmHQxTL-jfQ</record></xdata><xiphias><response method="GetParticipatingExperiments" service="mobile.abtesting.v1.AbTesting"><body>CjMKFWFub255bW91c19tYXRjaGluZ192NBIac2hvd192NF8xNWNoYXRzX2Vhcm5fc3BlbmQKHgoWdGlwcGluZ19zdGF0dXNfbWVzc2FnZRIEc2hvdwogChVhbm9ueW1vdXNfbWF0Y2hpbmdfdjMSB2NvbnRyb2wKIAoVYW5vbnltb3VzX21hdGNoaW5nX3YyEgdjb250cm9sCh4KDG5vX2tpbmRpYWxvZxIOc2hvcnRfdHV0b3JpYWwKQwoodGVtcF9iYW5fZWZmZWN0X21lYXN1cmVtZW50X2JvdGhwbGF0Zm9ybRIXeF8zX2VzY2FsYXRpb25fdGVtcF9iYW4KHQoSYW5vbnltb3VzX21hdGNoaW5nEgdjb250cm9sCjwKK3NldHRpbmdzX3B1YmxpY2dyb3VwcHJpdmFjeXYyX2JvdGhwbGF0Zm9ybXMSDXNob3dfZG10b2dnbGUKGwoTY2hhdF90aGVtZXNfYW5kcm9pZBIEZnJlZQopCiFjaGF0X3RoZW1lc19hbmRyb2lkX3ByZXNlcnZlX3BhaWQSBHBhaWQKHAoUY2hhdF90aGVtZXNfZnJlZV9pb3MSBHNob3cKGQoRa2luX3dhbGxldF9pcGhvbmUSBHNob3cKGgoSa2luX3dhbGxldF9hbmRyb2lkEgRzaG93CjYKG3Byb2ZpbGUtZnJhbWUtcGhvdG8tcHJldmlldxIXc2hvdy1wcm9maWxlLWZyYW1lLWljb24KGAoNZ2lmX2Zhdm9yaXRlcxIHY29udHJvbAoXCg9yZXNwb25kLXN0aWNrZXISBHNob3cKHQoTZ3JvdXBf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m9waHktY2FzZRIHY29udHJvbAodChRzci1rZXlib2FyZC1pY29uLWlvcxIFaWNvbjIKIQobbmV0d29ya19pbnRlcmZhY2Vfc2VsZWN0aW9uEgJvcwodChZzaG91bGRfYWx3YXlzX3NlZV90aGlzEgNhbGwKJwoWbGVnYWN5X2hhc2hfZXhwZXJpbWVudBINc2Vjb25kVmFyaWFudAolChV2ZXJ1c19oYXNoX2V4cGVyaW1lbnQSDGZpcnN0VmFyaWFudAoOCghhX2FfdGVzdBICYTEQAQ==</body></response></xiphias></query></iq>' Exception in callback KikClient._on_new_data_received(b'<iq id="4ae...</query></iq>') handle: <Handle KikClient._on_new_data_received(b'<iq id="4ae...</query></iq>')> Traceback (most recent call last): File "/usr/lib/python3.6/asyncio/events.py", line 145, in _run self._callback(*self._args) File "/home/maurits/.local/lib/python3.6/site-packages/kik_unofficial/client.py", line 492, in _on_new_data_received self._handle_received_iq_element(xml_element) File "/home/maurits/.local/lib/python3.6/site-packages/kik_unofficial/client.py", line 528, in _handle_received_iq_element self._handle_xmlns(iq_element.query['xmlns'], iq_element) File "/home/maurits/.local/lib/python3.6/site-packages/bs4/element.py", line 971, in __getitem__ return self.attrs[key] KeyError: 'xmlns'
on running echo_bot.py with log level = DEBUG:
[2019-08-06 20:16:53,510] INFO (thread Kik Connection): [+] Initiating the Kik Connection thread and connecting to kik server... [2019-08-06 20:16:54,049] INFO (thread Kik Connection): [!] Connected. [2019-08-06 20:16:54,049] DEBUG (thread Kik Connection): [+] Sending raw data: b'<k anon="">' [2019-08-06 20:16:54,052] DEBUG (thread Kik Connection): [!] Running main loop [2019-08-06 20:16:54,158] DEBUG (thread Kik Connection): [+] Received raw data: b'<k ok="1">' [2019-08-06 20:16:54,159] INFO (thread Kik Connection): [+] Logging in with username 'oopsiefloopsie' and a given password... [2019-08-06 20:16:54,312] DEBUG (thread Kik Connection): [+] Sending raw data: b'<iq type="set" id="631bcd1e-cdc6-40c2-9d5e-3ade246b8afd"><query xmlns="jabber:iq:register"><username>oopsiefloopsie</username><passkey-u>65ba21a8c969b465697aa1481f54e08a</passkey-u><device-id>62030843678b7376a707ca3d11e87837</device-id><install-referrer>utm_source=google-play&utm_medium=organic</install-referrer><operator>310260</operator><install-date>1494078709023</install-date><device-type>android</device-type><brand>generic</brand><logins-since-install>1</logins-since-install><version>14.5.0.13136</version><lang>en_US</lang><android-sdk>19</android-sdk><registrations-since-install>0</registrations-since-install><prefix>CAN</prefix><android-id>849d4ffb0c020de7</android-id><model>Samsung Galaxy S5 - 4.4.4 - API 19 - 1080x1920</model></query></iq>' [2019-08-06 20:16:54,424] DEBUG (thread Kik Connection): [+] Received raw data: b'<ack id="631bcd1e-cdc6-40c2-9d5e-3ade246b8afd"/>' [2019-08-06 20:16:54,535] DEBUG (thread Kik Connection): [+] Received raw data: b'<iq id="631bcd1e-cdc6-40c2-9d5e-3ade246b8afd" type="result"><query xmlns="jabber:iq:register"><node>oopsiefloopsie_nf2</node><email confirmed="false">whoopsiefloopsie@mail.com</email><username>oopsiefloopsie</username><first>Oopsie</first><last>Floopsie</last><xdata><record pk="ab_settings">CAAYAQ</record><record pk="chat_list_bins">CgsKCQoHa2lrdGVhbQ</record><record pk="one_time_use_records">mAEA</record><record pk="scanning_nonce_secret">CoACuzCnJAX7if-LaeHiSwlnMZS3X9xDxcTIDDjQqQJaPolhefippdDD4RmfY3or8HHkPlfUiWQXDkobRadkLQOO3vzXrK2WJda0sONn1AR0DxH4Kw5zVkeLWX-wtHaRyZllZ1fJdc1fvT56r6-ryhXlL93J2zrQ7cry4HiWk71X5QMEoRRbWNNmAce0OTPdhnLHVuMeYAA-Ey7ziIH58kHn4rDpXQljfBD-YFlkuIV6GLueZnR9K0H5CjO-_bXcRFnTxj1PFD86PBTK_ww9kYlGekk7QayYWUQ9KD97GkVFiLZcyhFlwvVj7A5p7HU9dl8qbBAPy6tA16zOmHQxTL-jfQ</record></xdata><xiphias><response service="mobile.abtesting.v1.AbTesting" method="GetParticipatingExperiments"><body>CjMKFWFub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hX2FfdGVzdBICYTEQAQ==</body></response></xiphias></query></iq>' Exception in callback KikClient._on_new_data_received(b'<iq id="631...</query></iq>') handle: <Handle KikClient._on_new_data_received(b'<iq id="631...</query></iq>')> Traceback (most recent call last): File "/usr/lib/python3.6/asyncio/events.py", line 145, in _run self._callback(*self._args) File "/home/maurits/.local/lib/python3.6/site-packages/kik_unofficial/client.py", line 492, in _on_new_data_received self._handle_received_iq_element(xml_element) File "/home/maurits/.local/lib/python3.6/site-packages/kik_unofficial/client.py", line 528, in _handle_received_iq_element self._handle_xmlns(iq_element.query['xmlns'], iq_element) File "/home/maurits/.local/lib/python3.6/site-packages/bs4/element.py", line 971, in __getitem__ return self.attrs[key] KeyError: 'xmlns'
Change line 528 of client.py to read:
self._handle_xmlns(iq_element.query['xmlns:'], iq_element)
I'll raise a PR shortly.
This has been updated in my fork, and a PR has been raised to merge the change back over.
https://github.com/tomer8007/kik-bot-api-unofficial/pull/127
Thank you @drmarvel
When I tried to launch echo_bot.py I got some error. Do you know how can I solve it?
Exception in callback KikClient._on_new_data_received(b'<iq id="1b8...') handle: <Handle KikClient._on_new_data_received(b'<iq id="1b8...')> Traceback (most recent call last): File "/usr/local/Cellar/python/3.7.2_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/Users/dir/Projects/venv/lib/python3.7/site-packages/kik_unofficial/client.py", line 492, in _on_new_data_received self._handle_received_iq_element(xml_element) File "/Users/dir/Projects/venv/lib/python3.7/site-packages/kik_unofficial/client.py", line 528, in _handle_received_iq_element self._handle_xmlns(iq_element.query['xmlns'], iq_element) File "/Users/dir/Projects/venv/lib/python3.7/site-packages/beautifulsoup4-4.8.0-py3.7.egg/bs4/element.py", line 971, in getitem return self.attrs[key] KeyError: 'xmlns'