Comments (6)
Thanks for the heads up. The delete method seems to work, but the response.text seems to always be empty even if you pass incorrect tokens...
Now I run into HTTP 503 Forbidden when accessing the segments of the following stream too quickly. Perhaps due to rate-limiting on the server-side.
from crunpyroll.
Thanks for the heads up. The delete method seems to work, but the response.text seems to always be empty even if you pass incorrect tokens...
Now I run into HTTP 503 Forbidden when accessing the segments of the following stream too quickly. Perhaps due to rate-limiting on the server-side.
I use delete active streams after i download the files of that episode, i think is the correct way to dont get any error, dont you think?
from crunpyroll.
I have a problem when I launch the episode download and put as fabrebatalla18 says await client.delete_active_stream behind the download function to run when it finishes I get the following error, what exactly am I doing wrong?
Do I have to call some missing import?
Do I have to make another way the call to perform the download, or it is not done this way?
Sorry if you don't understand me well, since I use translator, and I don't understand much of how phyton works since I am trying to adapt to my needs a script that was given to me.
import crunpyroll
import asyncio
import sys
import os
import requests
from pywidevine.cdm import Cdm
from pywidevine.pssh import PSSH
from pywidevine.device import Device
from uuid import uuid4
client = crunpyroll.Client(
*
*
*
)
async def main():
await client.start()
*
*
*
#We launch the download
# yt_dlp_url contains download instructions with yt_dlp.exe
os.system(yt_dlp_url)
# We wait for it to finish downloading
await client.delete_active_stream(
streams.media_id,
token=streams.token
)
# Get Widevine PSSH from manifest
*
*
*
cdm.parse_license(session_id, license)
print()
for key in cdm.get_keys(session_id, "CONTENT"):
print((f"{key.kid.hex}:{key.key.hex()}"),file=open('./Temporales/Key.txt','a'))
cdm.close(session_id)
asyncio.run(main())
File "E:\Crunchy Videos\Temporales\crunpyroll_cr2.py", line 117, in <module>
asyncio.run(main())
File "C:\Python311\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "E:\Crunchy Videos\Temporales\crunpyroll_cr2.py", line 106, in main
license = await client.get_license(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\crunpyroll\methods\get_license.py", line 34, in get_license
response = await self.api_request(
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\crunpyroll\client.py", line 117, in api_request
return Client.parse_response(response, method=method)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\crunpyroll\client.py", line 90, in parse_response
raise CrunpyrollException(message)
crunpyroll.errors.CrunpyrollException: [401] "Unauthorized"`
from crunpyroll.
I update, if I put it as in the example of @inks007
it works, but before it gave me the same error 503 that's why I changed as fabrebatalla18 said, but I get that error ><
testing now that it goes as inks017 has put it I have tried to download 4 files in a row and I see that I get 4 sessions in connected devices, so I do not know if it really works or is something else, because this should no longer happen, the multiple sessions, right?
cdm.parse_license(session_id, license)
print()
for key in cdm.get_keys(session_id, "CONTENT"):
print((f"{key.kid.hex}:{key.key.hex()}"),file=open('./Temporales/Key.txt','a'))
cdm.close(session_id)
# We wait for it to finish downloading
await client.delete_active_stream(
streams.media_id,
token=streams.token
)
asyncio.run(main())
from crunpyroll.
Where the line says device_id=str(uuid4()),
, replace str(uuid4())
with a fixed UUID.
You can generate a UUID below:
from uuid import uuid4
print(str(uuid4()))
from crunpyroll.
Yes, in the end I did just that to have a uuid and leave it fixed.
from crunpyroll.
Related Issues (18)
- Working but got caught in expected syntax of DICT for streams HOT 4
- Need a Method like browse HOT 1
- session expires after 5 minutes HOT 1
- How to obtain l3cdm.wvd file ?
- Add way to delete devices from account and PLAY HOST ? HOT 2
- Maybe they changed login method: auth.obtain_access_token.client_inactive
- How to get the series name and episode number? HOT 4
- Doubts to obtain the logout code
- Script to Kill session
- SSLCertVerificationError
- Problem downloading any type of music videos
- Error with crunpyroll authentication issues HOT 7
- get_old_streams seems to have been retired HOT 1
- api.py file error
- SyntaxError on self.account HOT 1
- Doesn't handle some movies as expected HOT 3
- This need premium account? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crunpyroll.