DevilXD / TwitchDropsMiner

An app that allows you to AFK mine timed Twitch drops, with automatic drop claiming and channel switching.
MIT License
1.67k stars 162 forks source link

No mining progress is being made #462

Closed 204065248 closed 4 months ago

204065248 commented 5 months ago

I want to drop treasure in Arena Breakout game, but it doesn't work properly

CrazyEden commented 5 months ago

Well yeah, but It looks like it needs it. I've been stuck on this for ages, can't find any info on it anywhere.

for the feature, you can find all(or most of) request via dev tools network debugging , here full body for this request: {"operationName":"PlaybackAccessToken_Template","query":"query PlaybackAccessToken_Template($login: String!, $isLive: Boolean!, $vodID: ID!, $isVod: Boolean!, $playerType: String!) { streamPlaybackAccessToken(channelName: $login, params: {platform: \"web\", playerBackend: \"mediaplayer\", playerType: $playerType}) @include(if: $isLive) { value signature authorization { isForbidden forbiddenReasonCode } typename } videoPlaybackAccessToken(id: $vodID, params: {platform: \"web\", playerBackend: \"mediaplayer\", playerType: $playerType}) @include(if: $isVod) { value signature typename }}","variables":{"isLive":true,"login":"LOGIN HERE","isVod":false,"vodID":"","playerType":"site"}}

just replace login, no any sha256hash

Windows200000 commented 5 months ago

Well yeah, but It looks like it needs it. I've been stuck on this for ages, can't find any info on it anywhere.

for the feature, you can find all(or most of) request via dev tools network debugging , here full body for this request: {"operationName":"PlaybackAccessToken_Template","query":"query PlaybackAccessToken_Template($login: String!, $isLive: Boolean!, $vodID: ID!, $isVod: Boolean!, $playerType: String!) { streamPlaybackAccessToken(channelName: $login, params: {platform: "web", playerBackend: "mediaplayer", playerType: $playerType}) @include(if: $isLive) { value signature authorization { isForbidden forbiddenReasonCode } typename } videoPlaybackAccessToken(id: $vodID, params: {platform: "web", playerBackend: "mediaplayer", playerType: $playerType}) @include(if: $isVod) { value signature typename }}","variables":{"isLive":true,"login":"LOGIN HERE","isVod":false,"vodID":"","playerType":"site"}}

just replace login, no any sha256hash

As far as I can see, TDM has no codebase to make non-persistent gql queries

Pashovichdjanchik commented 5 months ago

@giask11 thanks I'll know

Does anyone know how the hashes in constants.py are made?

its some kind of combination of type request and version, its static for the same type requests

i get this, but progress not working

now send request by one of this(or couple) link and it should work(checked a moment ago)

everything works, only now sometimes this error appears, do you know why it could be? URL rejected: Bad IPv6 address

CrazyEden commented 5 months ago

everything works, only now sometimes this error appears, do you know why it could be? URL rejected: Bad IPv6 address

never saw this error

Windows200000 commented 5 months ago

everything works, only now sometimes this error appears, do you know why it could be? URL rejected: Bad IPv6 address

Try to force ipv4 if you can. The actual solution would probably take like 10s, but good luck finding at what point in your network ipv6 has issues. It could also just be your ISP.

Windows200000 commented 5 months ago

Welp, I've spent a couple hours, but unless someone can tell me how to get that gql hash, I'm not gonna sink more time into trying to patch TDM to work. Without it, I can't use what TDM already has, and, besides having to rewrite basic functionality, I'd just make a complete mess for Devil to deal with.

420UNKNOWNx commented 5 months ago

Twitch watch this : 🍑

Carriosko commented 5 months ago

To sum it up, new video-watching method needs you to do this.

  1. Send GQL request with new parameters:
    "GetPlaybackAccessToken": {
            "operationName": "PlaybackAccessToken",
            "sha256": "3093517e37e4f4cb48906155bcd894150aef92617939236d2508f3375ab732ce",
            "variables": {
                "isLive": true,
                "login": "USER_LOGIN_HERE",
                "isVod": false,
                "vodID": "", 
                "playerType": "picture-by-picture"
                //OR "playerType": "site"
            }
        }

    This request response should give you signature and value.

  2. Make another request to https://usher.ttvnw.net/api/channel/hls/CHANNEL_LOGIN.m3u8?sig=SIGNATURE&token=ENCODED_VALUE&cdm=wv&player_version=1.22.0&player_type=pulsar&player_backend=mediaplayer&playlist_include_framerate=true&allow_source=true&transcode_mode=cbr_v1. This request gives you huge text where are URLs to streams with different quality.
  3. In the text response from request in the 2nd step we need to search for URL to use it in the next stem- regex is /(https:\/\/[\/\-\.\:\\,\"=\w]*m3u8)/gmi You can get multiple URL here, but usually the last one is the lowest video quality. You can also change regex to catch only the lowest video quality URL
  4. Send request to URL from step 3. Response from this request gives you huge text with URLs to video stream data. We use it in 5th step.
  5. In the text response from request in the 4th step we need to search for URL - regex is /(https:\/\/video-edge-[.\w\-\/]+\.ts(\?allow_stream\=true)?)/gmi. You can find multiple URLs there, but I guess that only one (last one) can be used.
  6. Make request to URL from 5th step - that makes your account to "watch" stream. If you saved multiple URLs from 5th step, you can make another request every 2 seconds until you use all URLs.
  7. Repeat the process, multiple times in a minute.

I have similar bot in nodeJs... so just convert the code above to python. Process should be the same.

Windows200000 commented 5 months ago
"GetPlaybackAccessToken": {
            "operationName": "PlaybackAccessToken",
            "sha256": "NEW_CODE",
            "variables": {
                "isLive": true,
                "login": "USER_LOGIN_HERE",
                "isVod": false,
                "vodID": "", 
                "playerType": "picture-by-picture"
                //OR "playerType": "site"
            }
        }

What is the hash and how do I get it?

Carriosko commented 5 months ago
"GetPlaybackAccessToken": {
            "operationName": "PlaybackAccessToken",
            "sha256": "NEW_CODE",
            "variables": {
                "isLive": true,
                "login": "USER_LOGIN_HERE",
                "isVod": false,
                "vodID": "", 
                "playerType": "picture-by-picture"
                //OR "playerType": "site"
            }
        }

What is the hash and how do I get it?

While watching stream - open developer console, go to "Network" tab, and search for "PlaybackAccessToken" in the list of requests. It may be the same like mine, but I rather removed it. I am just not sure if it is the same for everybody.

Windows200000 commented 5 months ago
"GetPlaybackAccessToken": {
            "operationName": "PlaybackAccessToken",
            "sha256": "NEW_CODE",
            "variables": {
                "isLive": true,
                "login": "USER_LOGIN_HERE",
                "isVod": false,
                "vodID": "", 
                "playerType": "picture-by-picture"
                //OR "playerType": "site"
            }
        }

What is the hash and how do I get it?

While watching stream - open developer console, go to "Network" tab, and search for "PlaybackAccessToken" in the list of requests. It may be the same like mine, but I rather removed it. I am just not sure if it is the same for everybody.

@Carriosko either I'm dumb, blind or my twitch front-end is different. I cannot find it.

image

Windows200000 commented 5 months ago

image This is all I can find, like yesterday.

Carriosko commented 5 months ago

Look in "Payload" tab, not in "Preview/Response". I checked this in private window, and it shows hash 3093517e37e4f4cb48906155bcd894150aef92617939236d2508f3375ab732ce. Probably it is global. I also edited my first post.

EnigmaWelcome commented 5 months ago

image This is all I can find, like yesterday.

You are a little inexperienced in this. I advise you to wait until DevilXD solves this problem itself and releases a bug fix

Windows200000 commented 5 months ago

You are a little inexperienced in this. I advise you to wait until DevilXD solves this problem itself and releases a bug fix

SHA256 is 256 bits long. That's 64 hex characters.

Like this: a5f2e34d626a9f4f5c0204f910bab2194948a9502089be558bb6e779a9e1b3d2

taht signature is 40 hex characters

Like this: 7bb5a6e6e544a15f939394eb4ada9b00f7816c03

Windows200000 commented 5 months ago

Look in "Payload" tab, not in "Preview/Response". I checked this in private window, and it shows hash 3093517e37e4f4cb48906155bcd894150aef92617939236d2508f3375ab732ce. Probably it is global. I also edited my first post.

Just found it there. Wow. I swear I searched through those at least 20 times yesterday. I think the issue might have been I always f5'd the page, instead of switching around through the twitch interface.

EnigmaWelcome commented 5 months ago

Look in "Payload" tab, not in "Preview/Response". I checked this in private window, and it shows hash 3093517e37e4f4cb48906155bcd894150aef92617939236d2508f3375ab732ce. Probably it is global. I also edited my first post.

Just found it there. Wow. I swear I searched through those at least 20 times yesterday. I think the issue might have been I always f5'd the page, instead of switching around through the twitch interface.

The search for this information took literally a minute for me.

Windows200000 commented 5 months ago

The search for this information took literally a minute for me.

Yeah, what I missed was, that you can't just load the stream, but that unlike the bot, the webpage only gets the persistent query hash on the second request, so if you start recording before hitting f5, you won't find it, you have to start recording, then f5, and then go to another stream, so it sends a second request of the same type.

Windows200000 commented 5 months ago

Anyways, it works now, thanks a lot, hopefully I'll be able to get it done soon. <3

Windows200000 commented 5 months ago

I think I did everything right, I'm getting the URLs, but I'm not getting progress.

It is now doing this every minute (I use pictures, so you have color formatting):

image

some examples of the request URLs:

https://video-weaver.fra05.hls.ttvnw.net/v1/playlist/CpgFiAE6yBaq2_m_Em0w9Ufn5ZjYNJYHIWXfddXIJTecKkCNfKSKYOYaBSAoNvHoi1x46WaYEJPHid7Vb7aca9AnNAaOC3nWCKTdvHb6kehXg8kuKW66N2uguh17davggxODf3I4fM7EwuNwBNKYgNDO9iB6gEy07O4iWZqV2M57NDjjHJnFL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8iqx9F1v6tJmDa1cP9v5HhwCPMiXYhm_jY1DF-EBaCsOCus4mNvlLMz6Nx0a-xvW-Hp4JN6eJXTMXc8vjenjzX0KBDq9TB7s7H5ml0ZG559xgaUWXZ2gkF0xr3qEMJaD38rxDvRaICh0EO0atdepjkixYufpxLFFw6Tl6OSeqJm1-J7xuWaT2VrgYDnJ1uF9F2CTNvYGgj-sVX699SCPH0sH4Q8KTAMiT1HdYOEUeCvZdBWWdeAyOmijHS7txlR5RjK7BWltcfXJ4zkN3Mm2MtQGv6-BXDHa1RcQPSh809WhhE9RdzsRYCSDaZe9ChPqnxmu_qjjSkNsnbHuw0HTqkEDL3Gb4zkVyN9qjmSbz-ggBlXCpJ-f5s93-krj5P4Kbv9zxqaOEoTWl7-VXuSE5lV15f2gk6GToi6YdLXPdtlrtKPsq86EPbllyvp8golqz30b6BuFC9xCtuQuBkjka_uXfeokg_gStQqs3Xx9ojJNVzX2YCHk3J9vF39tMruTVmDV3qmNTg1zH5BEelGgy8ptw9GoZQYSbnKhYgASoJZXUtd2VzdC0yMLYJ.m3u8) [200 OK]>
<CIMultiDictProxy('Cache-Control': 'no-cache, no-store, private', 'Content-Encoding': 'gzip', 'Content-Type': 'application/vnd.apple.mpegurl', 'Vary': 'Accept-Encoding', 'Date': 'Tue, 14 May 2024 17:14:21 GMT', 'Transfer-Encoding': 'chunked', 'Access-Control-Allow-Origin': '*')>

What am I missing? Do I still need to send minute watched?

edit2: Seems like I have to do another request, will update soon if that works

Carriosko commented 5 months ago

What am I missing? Do I still need to send minute watched?

Here you are on step 3. video-weaver contains information about video stream. Open it as text file and you will see video-edge links mentioned in step 5.

Windows200000 commented 5 months ago

Yep it works. Just gonna clean some stuff up I did for debugging. YAY :)

Windows200000 commented 5 months ago

Made the pull request: https://github.com/DevilXD/TwitchDropsMiner/pull/466. It's not quite robust, blindly parsing some links etc, but it should work.

I'll compile an exe for anyone that needs it too. edit2: I shouldn't teach you guys to just run random EXEs you find on the internet. Inspect the changes I made and build it using build.bat.

edit: The pull request can also serve as a complete example of what needs to be done to get progress with the changed API, for anyone that needs it for other projects.

Windows200000 commented 5 months ago

Thanks to @CrazyEden for finding the fix and @Carriosko for the useful summary (DĂ­ky!).

Windows200000 commented 5 months ago

@DevilXD https://github.com/DevilXD/TwitchDropsMiner/pull/466 Pull request for fix, that at least works.

EnigmaWelcome commented 5 months ago

What am I missing? Do I still need to send minute watched?

Here you are on step 3. video-weaver contains information about video stream. Open it as text file and you will see video-edge links mentioned in step 5.

The viewing time is incorrect in this way. I've been watching the broadcast for 20 minutes, and the drops progress is only 16 minutes long. It turns out I'm wasting some of my time.

Do you know what the problem is?

Windows200000 commented 5 months ago

What am I missing? Do I still need to send minute watched?

Here you are on step 3. video-weaver contains information about video stream. Open it as text file and you will see video-edge links mentioned in step 5.

The viewing time is incorrect in this way. I've been watching the broadcast for 20 minutes, and the drops progress is only 16 minutes long.

Do you know what the problem is?

I would try doing the request every 62 or so seconds, since it probably just checks whether the last one was more than a minute ago.

EnigmaWelcome commented 5 months ago

I checked and set a different delay. I tried for 20-40-60 seconds, but the result is the same. The stream is viewed for 30 minutes, and drops progress is counted for only 22-24 minutes. Some of the time just disappears

Carriosko commented 5 months ago

While watching stream, requests to both video-edge and video-weaver are made every 2 seconds.

EnigmaWelcome commented 5 months ago

While watching stream, requests to both video-edge and video-weaver are made every 2 seconds.

Are you suggesting making a request every 2 seconds? We need to check it out.

Windows200000 commented 5 months ago

I checked and set a different delay. I tried for 20-40-60 seconds, but the result is the same. The stream is viewed for 30 minutes, and drops progress is counted for only 22-24 minutes. Some of the time just disappears

If you have the time, you could just test intervals and see what works best. The individual video file has 35 frames at 30fps (at least the one I had), so I would test anything from a second up to a few minutes and see how fast it happens. Alternatively, you could try sending one like every 5 minutes and then figure out how much progress you got per download. If you figure anything useful out, please report back.

Windows200000 commented 5 months ago

image image

GoesInCircles commented 5 months ago

Just a thought: do we really need to account for every single second for drop progress bar? Even if we miss minutes, drop period is long enough to cover for it.

In other hand if it was for channel point, I would understand.

EnigmaWelcome commented 5 months ago

I checked and set a different delay. I tried for 20-40-60 seconds, but the result is the same. The stream is viewed for 30 minutes, and drops progress is counted for only 22-24 minutes. Some of the time just disappears

If you have the time, you could just test intervals and see what works best. The individual video file has 35 frames at 30fps (at least the one I had), so I would test anything from a second up to a few minutes and see how fast it happens. Alternatively, you could try sending one like every 5 minutes and then figure out how much progress you got per download. If you figure anything useful out, please report back.

If you take an interval of more than 60 seconds (1 minute+), then the progress is worse

Windows200000 commented 5 months ago

Just a thought: do we really need to account for every single second for drop progress bar? Even if we miss minutes, drop period is long enough to cover for it.

In other hand if it was for channel point, I would understand.

There are some drops that are restricted to one channel, where you need to watch an entire tournament or whatever. Same reason why starting late was a reported issue.

EnigmaWelcome commented 5 months ago

warframe drops are strictly limited in time.There are many more such games. It takes a minute at a time for it to be

Just a thought: do we really need to account for every single second for drop progress bar? Even if we miss minutes, drop period is long enough to cover for it.

In other hand if it was for channel point, I would understand.

GoesInCircles commented 5 months ago

Just a thought: do we really need to account for every single second for drop progress bar? Even if we miss minutes, drop period is long enough to cover for it. In other hand if it was for channel point, I would understand.

There are some drops that are restr5icted to one channel, where you need to watch an entire tournament or whatever. Same reason why starting late was a reported issue.

Yeah I know. Game Im farming/playing which has drop dedicated streams are much longer than required time. Imagine angry mobs if required time was equal to stream lenght. And we are usimg bot that tunes in at very beginning, I believe even with lost time you legends got us covered.

But if perfection is the target, Im all for it

Windows200000 commented 5 months ago

Yeah I know. Game Im farming/playing which has drop dedicated streams are much longer than required time. Imagine angry mobs if required time was equal to stream lenght. And we are usimg bot that tunes in at very beginning, I believe even with lost time you legends got us covered.

But if perfection is the target, Im all for it

No. #428

GoesInCircles commented 5 months ago

Yeah I know. Game Im farming/playing which has drop dedicated streams are much longer than required time. Imagine angry mobs if required time was equal to stream lenght. And we are usimg bot that tunes in at very beginning, I believe even with lost time you legends got us covered. But if perfection is the target, Im all for it

No. #428

It wasnt about "they are onto us". Just practical reason: it works good enough and longer stream time will cover for missed %.

But if you aim for getting every single %, Im rooting for you, because Im already happy that I wont further need to teamviewer to my backup pc to start stream and letting "automatic twitch drops" addon farm it for me

Windows200000 commented 5 months ago

It wasnt about "they are onto us". Just practical reason: it works good enough and longer stream time will cover for missed %.

But if you aim for getting every single %, Im rooting for you, because Im already happy that I wont further need to teamviewer to my backup pc to start stream and letting "automatic twitch drops" addon farm it for me

From the issue I linked you:

When first starting the program, it will check for active campaigns every 60 minutes three seconds.

If the campaign starts at the top of the hour and only lasts 45 minutes and the drop happens after 15 minutes of watching, it will be missed if the check happens at 55 minutes( five minutes before the top of the hour.)

Missed here refers to the drop expiring, before it is completed.

The only way to set this is to start the program at 5 minutes after the hour. But this get messed up after watching a campaign and goes back into wait mode.

This part makes it clear, that you have to do a work around, to be able to get the drop

In my case, I started the program at 5 after the hour. After a couple campaigns, it now checking at :51. Not desired due to now is missing the short campaigns.

Again clearly states, that it's missing campaigns.

Windows200000 commented 5 months ago

So it turns out something is weird with how TDM calculates time remaining. I think on every watch video call it resets the timer to one minute less, so when you change the rate, the times become unreliable. Will have to restart testing the efficiency.

Haymiritch commented 5 months ago

Hello. I ran into a problem, I can’t pick up the drops, it tells me about a certain error “failed integrity check”. The complete error looks like this: "[{"errors":[{"message":"failed integrity check"}],"extensions":{"challenge":{"type":"integrity"},"durationMilliseconds":2,"operationName": "DropsPage_ClaimDropRewards","requestID":"01HXWDMQYMZIQLZ87D9AS9SUSK"}}]". I pass the user agent, auth token in the request, I also tried client-integrity, and lastly I tried absolutely all the headers from the browser, but it still writes about this error. Does anyone know how to solve this?

DevilXD commented 5 months ago

@Haymiritch Are you using some kind of a modified client, or you're getting this from just TDM + whatever fix this issue came up with?

@Windows200000 The time remaining timer was designed to work together with the old drops system, that used "minutesRemaining" to specify the drop progress. Since the progress could only change every minute, the timer was designed to take in the amount of minutes remaining, and then just count down 60 seconds each time it's set to a new progress value. If the watch period is anything different from 58-62 seconds, you'll see the timer either restart before it counts down the entire minute, or count down the entire minute and then stop, awaiting the next progress update. Changing how this works would require redesigning the timer.

Windows200000 commented 5 months ago

@Windows200000 The time remaining timer was designed to work together with the old drops system, that used "minutesRemaining" to specify the drop progress. Since the progress could only change every minute, the timer was designed to take in the amount of minutes remaining, and then just count down 60 seconds each time it's set to a new progress value. If the watch period is anything different from 58-62 seconds, you'll see the timer either restart before it counts down the entire minute, or count down the entire minute and then stop, awaiting the next progress update. Changing how this works would require redesigning the timer.

@DevilXD >

Yeah. Unfortunately, it seems like we might have to reduce this time for mining time-efficiently now. I also feel like python might be too slow, as the whole watch loop take 10s on my decent PC, while at the same time a 30s frequency still only gives about 90% of progress, with the current 59s freequency only giving around 60%. I'm tracking this in #467, as it seems to not be trivial.

Haymiritch commented 5 months ago

@Haymiritch Are you using some kind of a modified client, or you're getting this from just TDM + whatever fix this issue came up with?

I'm trying to make my own script based on yours, but I don't understand why I get an error when collecting drops. When I get the integrity token there, "is_bad_bot" is always true, is there any way to work around this?

Luckz commented 5 months ago

@Haymiritch Are you using some kind of a modified client, or you're getting this from just TDM + whatever fix this issue came up with?

I'm trying to make my own script based on yours, but I don't understand why I get an error when collecting drops. When I get the integrity token there, "is_bad_bot" is always true, is there any way to work around this?

Once you are a bad bot, you might at the very least need a new client login. For example, when I was using headless browser automation to idle for drops, this meant making a fresh browser userdata profile and acting sort of human before using it for automation again.

Windows200000 commented 5 months ago

So, IMHO, the fix in #466 is now good enough for a release. I don't know when DevilXD will have time to release it here, or whether he wants to change some more stuff before he does so. It does now have to send a request every 20s (some people suggested there might be another way, but there is nothing concrete).

But it is now in a state, where you probably won't notice the change to how it was before. If you want it, download and build it from my fork.

DevilXD commented 5 months ago

I'm stuck working ~10-13h a day, 5 days a week, then 12h of driving back-n-forth between remote work site and home, and 1.5 days of the weekend, which is the only free time I get to regen physically and mentally, before more work next week, all until the middle of June, where it all hopefully ends. I can only push out small patches here and there, but this issue sounds like a big one. The miner needs a rewrite anyway, so basically it's as good time as any, to break everything and rebuild it to work better than before.

234 tracks everything that needs to be done... someday, when I'll finally have the time and willpower to sit down for a rewrite.

Windows200000 commented 5 months ago

I'm stuck working ~10-13h a day, 5 days a week, then 12h of driving back-n-forth between remote work site and home, and 1.5 days of the weekend, which is the only free time I get to regen physically and mentally, before more work next week, all until the middle of June, where it all hopefully ends. I can only push out small patches here and there, but this issue sounds like a big one. The miner needs a rewrite anyway, so basically it's as good time as any, to break everything and rebuild it to work better than before.

234 tracks everything that needs to be done... someday, when I'll finally have the time and willpower to sit down for a rewrite.

@DevilXD Focus on yourself. Your health is more important, than a Twitch Drops Miner. I will try to maintain the fork in working order and provide releases in the meantime. If you have any remarks or reservations about how I do things, feel free to raise them. It's your code.

Thanks for your awesome work on this. <3

Coldblackice commented 5 months ago

@DevilXD All good, and thanks heaps for all your effort on this. It's become the de facto tool that I and many others rely on, and have relied on for multiple years now.

@Windows200000 I just downloaded and built your fork of this last night, and it works perfectly. I hadn't received any drops progress in nearly two weeks until building your fork last night. It's great to see them progressing again -- thanks for carrying this torch!