Twitch-Channel-Points-Miner-v2 icon indicating copy to clipboard operation
Twitch-Channel-Points-Miner-v2 copied to clipboard

Add integrity request

Open bossoq opened this issue 2 years ago • 13 comments

Description

To fix issues #592 caused by Twitch API needs Client-Integrity header which can be retrieved by post request to https://gql.twitch.tv/integrity with required headers.

Type of change

  • [x] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

I have tried to claim channel points from various streams with success response.

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my code
  • [x] I have commented on my code, particularly in hard-to-understand areas
  • [x] My changes generate no new warnings

bossoq avatar Sep 15 '22 09:09 bossoq

Awesome! 🤩 The community it's really happy for this

I got a new job and move to another city, so I don't have too much time, I'm also without internet at home 🥺

I hope to review this PR asap!

Tkd-Alex avatar Sep 15 '22 09:09 Tkd-Alex

Actually digging a bit into it, Client-Version can be found on twitch page with this regex: https://github.com/RakSrinaNa/ChannelPointsMiner/pull/292/commits/5777cfa4a7a92be7144a00480845dedcfb3ebfce#diff-bffe02af4af21c99c40d08a1e3c0dfc2b55068ceb14046b7922adeb1ec6be940R66

Rakambda avatar Sep 16 '22 20:09 Rakambda

I can confirm this works and fixed the issue for me. Great job!

grgsim avatar Sep 17 '22 21:09 grgsim

Replaced the 2 files in the directories mentioned but starts to give error?

AbdulMoeezBaig avatar Sep 21 '22 00:09 AbdulMoeezBaig

It started to work as intended. Good job! Screenshot_100

Autistic-Unicorn avatar Sep 21 '22 15:09 Autistic-Unicorn

Can anyone help in telling how to apply the fix?

AbdulMoeezBaig avatar Sep 21 '22 15:09 AbdulMoeezBaig

Fix another bug :) Twitch update Client-Version more frequent than I thought, so I change update_client_version function to be called on every post_gql_request. Hope this help :)

bossoq avatar Sep 22 '22 02:09 bossoq

Fix another bug :) Twitch update Client-Version more frequent than I thought, so I change update_client_version function to be called on every post_gql_request. Hope this help :)

Can someone mention how to implement the fix? [is it just replacing the 2 mentioned files or is there more to it?]

AbdulMoeezBaig avatar Sep 22 '22 03:09 AbdulMoeezBaig

Fix another bug :) Twitch update Client-Version more frequent than I thought, so I change update_client_version function to be called on every post_gql_request. Hope this help :)

Can someone mention how to implement the fix? [is it just replacing the 2 mentioned files or is there more to it?]

Yes. You need to replace constants.py and Twitch.py.

LeoAlt8 avatar Sep 22 '22 04:09 LeoAlt8

@bossoq , thank you very much for the fixes and support! ❤️

LeoAlt8 avatar Sep 22 '22 04:09 LeoAlt8

Fix another bug :) Twitch update Client-Version more frequent than I thought, so I change update_client_version function to be called on every post_gql_request. Hope this help :)

Can someone mention how to implement the fix? [is it just replacing the 2 mentioned files or is there more to it?]

Yes. You need to replace constants.py and Twitch.py.

Definitely sounds stupid but how do I copy the new code? If I plain copy it, it copies with alot of extra stuff and if i remove it gives error (probably i didnt remove properly), any way to just copy the new code ? and simple replace? (if i download the whole thing again, it still gives me the old files)

AbdulMoeezBaig avatar Sep 22 '22 04:09 AbdulMoeezBaig

Fix another bug :) Twitch update Client-Version more frequent than I thought, so I change update_client_version function to be called on every post_gql_request. Hope this help :)

Can someone mention how to implement the fix? [is it just replacing the 2 mentioned files or is there more to it?]

Yes. You need to replace constants.py and Twitch.py.

Definitely sounds stupid but how do I copy the new code? If I plain copy it, it copies with alot of extra stuff and if i remove it gives error (probably i didnt remove properly), any way to just copy the new code ? and simple replace? (if i download the whole thing again, it still gives me the old files)

Here Release

bossoq avatar Sep 22 '22 04:09 bossoq

Fix another bug :) Twitch update Client-Version more frequent than I thought, so I change update_client_version function to be called on every post_gql_request. Hope this help :)

Can someone mention how to implement the fix? [is it just replacing the 2 mentioned files or is there more to it?]

Yes. You need to replace constants.py and Twitch.py.

Definitely sounds stupid but how do I copy the new code? If I plain copy it, it copies with alot of extra stuff and if i remove it gives error (probably i didnt remove properly), any way to just copy the new code ? and simple replace? (if i download the whole thing again, it still gives me the old files)

Here Release

Thank you for taking the time for this dumb ass

AbdulMoeezBaig avatar Sep 22 '22 04:09 AbdulMoeezBaig

Leaving an update here, I replaced constants.py and Twitch.py a while back and it was initially successful in being able to auto-claim drops.

I just noticed today that it failed to redeem (I had to manually click the button).

Before: 22/09/22 12:50:05 - INFO - [claim_bonus]: 🎁 Claiming the bonus for Streamer(username=XXX, channel_id=XXX, channel_points=804.77k)! 22/09/22 12:50:05 - INFO - [on_message]: 🚀 +70 → Streamer(username=XXX, channel_id=XXX, channel_points=804.84k) - Reason: CLAIM.

After:

22/09/22 13:35:07 - INFO - [claim_bonus]: 🎁 Claiming the bonus for Streamer(username=XXX, channel_id=XXX, channel_points=805.11k)! 22/09/22 13:40:07 - INFO - [on_message]: 🚀 +14 → Streamer(username=XXX, channel_id=XXX, channel_points=805.12k) - Reason: WATCH. 22/09/22 13:40:14 - INFO - [on_message]: 🚀 +70 → Streamer(username=XXX, channel_id=XXX, channel_points=805.19k) - Reason: CLAIM.

Edit: restarted the script and they claimed. Will continue to monitor.

admiralflapjack avatar Sep 22 '22 18:09 admiralflapjack

after the last update this happened and I don't understand what is wrong. I tried everything I could but no use. edit: I see other people having the same issue in #606 . Screenshot 2022-09-23 034847

abdulelah2737 avatar Sep 23 '22 01:09 abdulelah2737

I came back to the miner today and it had stopped claiming drops again. Updated constants.py and Twitch.py to their latest versions, restarted the script, no change, watch streaks are claimed but drops are not successfully claimed.

admiralflapjack avatar Sep 23 '22 19:09 admiralflapjack

Observing a similar thing. The Script posts the update "Claim " to my Telegram, but doesn't actually claim it.

ColinShark avatar Sep 23 '22 22:09 ColinShark

Can confirm the issue. Twitch just won't stop fighting automation. :(. What is interesting, I have several accounts, and some of them are still claiming bonuses like nothing changed.

rdavydov avatar Sep 24 '22 08:09 rdavydov

Can confirm the issue. Twitch just won't stop fighting automation. :(. What is interesting, I have several accounts, and some of them are still claiming bonuses like nothing changed.

+1, having the same issue again today.

kcyakici avatar Sep 24 '22 22:09 kcyakici

Im having the same issue I need to manually click to have the 50 points with each streamers otherwise the bot is working good..

m3dll avatar Sep 25 '22 17:09 m3dll

also having issues with the bot claiming the bonus box but only on some accounts

nauit avatar Sep 25 '22 19:09 nauit

Fix another bug :) Twitch update Client-Version more frequent than I thought, so I change update_client_version function to be called on every post_gql_request. Hope this help :)

I have version before this fix and i still receive bonus points without any problem, but then my script works without reseting it for days or so. Maybe this information gonna help with something.

Autistic-Unicorn avatar Sep 25 '22 21:09 Autistic-Unicorn

I tried to use this version (1.1) and worked after launched 2/3 times the run.py file and restart my device. I had the problem 2 times and solved it like that. Now it's getting +50 and working with my telegram bot fine. Hope it will help

Fix another bug :) Twitch update Client-Version more frequent than I thought, so I change update_client_version function to be called on every post_gql_request. Hope this help :)

Can someone mention how to implement the fix? [is it just replacing the 2 mentioned files or is there more to it?]

Yes. You need to replace constants.py and Twitch.py.

Definitely sounds stupid but how do I copy the new code? If I plain copy it, it copies with alot of extra stuff and if i remove it gives error (probably i didnt remove properly), any way to just copy the new code ? and simple replace? (if i download the whole thing again, it still gives me the old files)

Here Release

m3dll avatar Sep 26 '22 16:09 m3dll

For me this doesn't work, its random as it seems which accounts have issues. I use a sh file which starts all my Bots at the same time, and 40 % of them are facing the issue that they don't get the 50 Coins. But the funny thing is, everytime I restart this it shuffels which of them doesn't work.

I tried to use this version (1.1) and worked after launched 2/3 times the run.py file and restart my device. I had the problem 2 times and solved it like that. Now it's getting +50 and working with my telegram bot fine. Hope it will help

Fix another bug :) Twitch update Client-Version more frequent than I thought, so I change update_client_version function to be called on every post_gql_request. Hope this help :)

Can someone mention how to implement the fix? [is it just replacing the 2 mentioned files or is there more to it?]

Yes. You need to replace constants.py and Twitch.py.

Definitely sounds stupid but how do I copy the new code? If I plain copy it, it copies with alot of extra stuff and if i remove it gives error (probably i didnt remove properly), any way to just copy the new code ? and simple replace? (if i download the whole thing again, it still gives me the old files)

Here Release

Kurotaku-sama avatar Sep 27 '22 07:09 Kurotaku-sama

It was working but seems like it's broken again, any idea to fix it?

Glomerius avatar Sep 27 '22 17:09 Glomerius

Can confirm mine is having the same issue now, no longer seems able to claim the +50 points, or place predictions. Maybe fully broken again?

BarkerB avatar Sep 27 '22 17:09 BarkerB

I can confirm I am having the same issues using this patch, no bonus 50 channel points claimed, no bets placed.

antipatico avatar Sep 27 '22 21:09 antipatico

For me this doesn't work, its random as it seems which accounts have issues. I use a sh file which starts all my Bots at the same time, and 40 % of them are facing the issue that they don't get the 50 Coins. But the funny thing is, everytime I restart this it shuffels which of them doesn't work.

I tried to use this version (1.1) and worked after launched 2/3 times the run.py file and restart my device. I had the problem 2 times and solved it like that. Now it's getting +50 and working with my telegram bot fine. Hope it will help

Fix another bug :) Twitch update Client-Version more frequent than I thought, so I change update_client_version function to be called on every post_gql_request. Hope this help :)

Can someone mention how to implement the fix? [is it just replacing the 2 mentioned files or is there more to it?]

Yes. You need to replace constants.py and Twitch.py.

Definitely sounds stupid but how do I copy the new code? If I plain copy it, it copies with alot of extra stuff and if i remove it gives error (probably i didnt remove properly), any way to just copy the new code ? and simple replace? (if i download the whole thing again, it still gives me the old files)

Here Release

Yes, I haved the same issue, But I closed only bots which didn't get 50 coins and started them again, then part of them again worked good. And I did this until all the bots started working normally. But now again all bots stopped getting 50 coins.

nilarom avatar Sep 28 '22 12:09 nilarom

@nilarom Same problem, yesterday at 7PM (GMT+2) the bot (working fine) suddenly stopped bets and claims but still getting +10. Even if I try to reboot or whatever it wont work...

m3dll avatar Sep 28 '22 12:09 m3dll

Same issue here.

JonJaded avatar Sep 29 '22 20:09 JonJaded