yakyak / hangupsjs

google hangouts client library for nodejs
226 stars 46 forks source link

Fix the email field number #102

Closed tomasz-musialek closed 5 years ago

tomasz-musialek commented 5 years ago

HangupsJS stopped working about an hour ago due to the changes in the HTML that Google returns and as result YakYak stopped working too.

Fixing the email field number in the "yakyak-linux-x64/resources/app/node_modules/hangupsjs/lib/init.js" from "ds:36" to "ds:33" seems to solve the problem, so I suppose changing it here in the "src/init.coffee" file should do the trick.

I think this will require a new binary release of YakYak too.

tomasz-musialek commented 5 years ago

CI tests seem to fail, but it's likely that due to how Google renumbered the fields, the tests need to be updated to reflect the new structure.

averissimo commented 5 years ago

@tomasz-musialek can you confirm that current master fixes this?

there was a small difference between your pull request and #104

tomasz-musialek commented 5 years ago

@averissimo Yes, current master seems to fix this, so this pull request may be closed.

averissimo commented 5 years ago

@tomasz-musialek thanks for the quick patch!!

I'm a bit concerned that you are using a different index for the email than of the current master

tomasz-musialek commented 5 years ago

@averissimo

I created the patch in under an hour after Google changed the HTML they return. It worked fine and a few people thanked me for that, but after ANOTHER hour Google changed it AGAIN.

The current master reflects the Google's changes after that second change, so it's up-to-date with current Google's structures - but Google changes those structures every few months, or so, so we might need to find a more robust solution - some heuristics, maybe? I know "heuristics" might not sound too stable, but either way it's not very stable, because we're using internal, undocumented Google's API anyway.

Btw. is there any document specifying the (non-official, obviously) Hangouts' API?

averissimo commented 5 years ago

Ok, thanks, I did not dive to the code and run it to retroengineer the response :)

The best description that I know of is in https://github.com/tdryer/hangups/ repository. The js implementation is based on this.