Comments (4)
Crispy and cleaner. Worked like a champ. Top notch.
from crunpyroll.
@clintm99 can you give me code and output? anyway, pass one item of episodes
in get_streams()
to get streams
from crunpyroll.
Hi, Thanks.
cr.get_seasons("GR4PVDGEY")
[{'class': 'season', 'href': '/cms/v2/US/M3/crunchyroll/seasons/GY1X4ZQ2Y', 'resource_key': 'cms:/seasons/GY1X4ZQ2Y', 'links': {'season/channel': {'href': '/cms/v2/US/M3/crunchyroll/channels/crunchyroll'}, 'season/episodes': {'href': '/cms/v2/US/M3/crunchyroll/episodes?season_id=GY1X4ZQ2Y'}, 'season/series': {'href': '/cms/v2/US/M3/crunchyroll/series/GR4PVDGEY'}}, 'actions': {}, 'id': 'GY1X4ZQ2Y', 'channel_id': 'crunchyroll', 'title': 'Full Metal Panic! Invisible Victory', 'slug_title': 'full-metal-panic-invisible-victory', 'series_id': 'GR4PVDGEY', 'season_number': 1, 'is_complete': False, 'description': '', 'keywords': [], 'season_tags': ['Primavera-2018'], 'images': {}, 'is_mature': False, 'mature_blocked': False, 'is_subbed': True, 'is_dubbed': False, 'is_simulcast': False, 'seo_title': '', 'seo_description': '', 'availability_notes': ''}]
cr.get_episodes("GY1X4ZQ2Y")
...
{'class': 'episode', 'href': '/cms/v2/US/M3/crunchyroll/episodes/GR4P9498Y', 'resource_key': 'cms:/episodes/GR4P9498Y', 'links': {'episode/channel': {'href': '/cms/v2/US/M3/crunchyroll/channels/crunchyroll'}, 'episode/season': {'href': '/cms/v2/US/M3/crunchyroll/seasons/GY1X4ZQ2Y'}, 'episode/series': {'href': '/cms/v2/US/M3/crunchyroll/series/GR4PVDGEY'}, 'streams': {'href': '/cms/v2/US/M3/crunchyroll/videos/GM8FXDG8M/streams'}}, 'actions': {}, 'id': 'GR4P9498Y', 'channel_id': 'crunchyroll', 'series_id': 'GR4PVDGEY', 'series_title': 'Full Metal Panic! Invisible Victory', 'series_slug_title': 'full-metal-panic-invisible-victory', 'season_id': 'GY1X4ZQ2Y', 'season_title': 'Full Metal Panic! Invisible Victory', 'season_slug_title': 'full-metal-panic-invisible-victory', 'season_number': 1, 'episode': '12', 'episode_number': 12, 'sequence_number': 12, 'production_episode_id': '', 'title': 'Make My Day', 'slug_title': 'make-my-day', 'description': '', 'hd_flag': True, 'is_mature': False, 'mature_blocked': False, 'episode_air_date': '2018-07-18T20:30:00+09:00', 'is_subbed': True, 'is_dubbed': False, 'is_clip': False, 'seo_title': '', 'seo_description': '', 'season_tags': ['Primavera-2018'], 'available_offline': True, 'media_type': 'episode', 'slug': '', 'images': {'thumbnail': [[{'width': 320, 'height': 180, 'type': 'thumbnail', 'source': 'https://beta.crunchyroll.com/imgsrv/display/thumbnail/320x180/catalog/crunchyroll/0e7a0ed31c2810a8efc07e45e47124ca.jpeg'}, {'width': 600, 'height': 338, 'type': 'thumbnail', 'source': 'https://beta.crunchyroll.com/imgsrv/display/thumbnail/600x338/catalog/crunchyroll/0e7a0ed31c2810a8efc07e45e47124ca.jpeg'}, {'width': 640, 'height': 360, 'type': 'thumbnail', 'source': 'https://beta.crunchyroll.com/imgsrv/display/thumbnail/640x360/catalog/crunchyroll/0e7a0ed31c2810a8efc07e45e47124ca.jpeg'}, {'width': 800, 'height': 450, 'type': 'thumbnail', 'source': 'https://beta.crunchyroll.com/imgsrv/display/thumbnail/800x450/catalog/crunchyroll/0e7a0ed31c2810a8efc07e45e47124ca.jpeg'}, {'width': 1200, 'height': 675, 'type': 'thumbnail', 'source': 'https://beta.crunchyroll.com/imgsrv/display/thumbnail/1200x675/catalog/crunchyroll/0e7a0ed31c2810a8efc07e45e47124ca.jpeg'}, {'width': 1440, 'height': 810, 'type': 'thumbnail', 'source': 'https://beta.crunchyroll.com/imgsrv/display/thumbnail/1440x810/catalog/crunchyroll/0e7a0ed31c2810a8efc07e45e47124ca.jpeg'}, {'width': 1600, 'height': 900, 'type': 'thumbnail', 'source': 'https://beta.crunchyroll.com/imgsrv/display/thumbnail/1600x900/catalog/crunchyroll/0e7a0ed31c2810a8efc07e45e47124ca.jpeg'}, {'width': 1920, 'height': 1080, 'type': 'thumbnail', 'source': 'https://beta.crunchyroll.com/imgsrv/display/thumbnail/1920x1080/catalog/crunchyroll/0e7a0ed31c2810a8efc07e45e47124ca.jpeg'}]]}, 'duration_ms': 1450099, 'is_premium_only': False, 'listing_id': '', 'subtitle_locales': ['en-US'], 'playback': 'https://pl.crunchyroll.com/asset/13b7d1a06139c49047fcb52d212368cb/v/b3c91d51a44aca33d1ab393a2b0ec83c/languages/en-US?*&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cCo6Ly9wbC5jcnVuY2h5cm9sbC5jb20vYXNzZXQvMTNiN2QxYTA2MTM5YzQ5MDQ3ZmNiNTJkMjEyMzY4Y2Ivdi9iM2M5MWQ1MWE0NGFjYTMzZDFhYjM5M2EyYjBlYzgzYy8~KiIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTYzODk0ODEyNX19fV19&Signature=Ac33o63Q-3KRoIJPSS7nshCoIULBNJq0KctpAfj6ciwh9wCXZ0OS5JEbJKsSzj4qLfl775P5yrI4hLDVU8jVpPVzeuh1oEncfJIzM3-WdrCbxTfhacjo~A4nd8KOPcHO0uLcyLJWQujGmt09IaEtL-l6gyo71-6I1z7J8lWOc0~IipQRaMgn2-D3-Iwm3re~tC69aTvANJ0D0TlCd92SNaIoYuUJI4IQqIBVEykdpP6fuw1I6AGXXqE4-oUlGDjDY9oEGEGpdpmOnLb5zRsgRvdLQU8m~aVWneQo3Sd9yE8njR3BXhcBFqI19EjTcb8ffZNmaS9EicIJvZ3lJKCqYg__&Key-Pair-Id=APKAJMWSQ5S7ZB3MF5VA', 'availability_notes': ''}]
...
Figured out I needed to put the whole class in there. Passed output to var object stream
stream = cr.get_streams( {'class': 'episode', 'href': '/cms/v2/US/M3/crunchyroll/episodes/GR4P9498Y', 'resource_key': 'cms:/episodes/GR4P9498Y', 'links': {'episode/channel': {'href': '/cms/v2/US/M3/crunchyroll/channels/crunchyroll'}, 'episode/season': {'href': '/cms/v2/US/M3/crunchyroll/seasons/GY1X4ZQ2Y'}, 'episode/series': {'href': '/cms/v2/US/M3/crunchyroll/series/GR4PVDGEY'}, 'streams': {'href': '/cms/v2/US/M3/crunchyroll/videos/GM8FXDG8M/streams'}}, 'actions': {}, 'id': 'GR4P9498Y', 'channel_id': 'crunchyroll', 'series_id': 'GR4PVDGEY', 'series_title': 'Full Metal Panic! Invisible Victory', 'series_slug_title': 'full-metal-panic-invisible-victory', 'season_id': 'GY1X4ZQ2Y', 'season_title': 'Full Metal Panic! Invisible Victory', 'season_slug_title': 'full-metal-panic-invisible-victory', 'season_number': 1, 'episode': '12', 'episode_number': 12, 'sequence_number': 12, 'production_episode_id': '', 'title': 'Make My Day', 'slug_title': 'make-my-day', 'description': '', 'hd_flag': True, 'is_mature': False, 'mature_blocked': False, 'episode_air_date': '2018-07-18T20:30:00+09:00', 'is_subbed': True, 'is_dubbed': False, 'is_clip': False, 'seo_title': '', 'seo_description': '', 'season_tags': ['Primavera-2018'], 'available_offline': True, 'media_type': 'episode', 'slug': '', 'images': {'thumbnail': [[{'width': 320, 'height': 180, 'type': 'thumbnail', 'source': 'https://beta.crunchyroll.com/imgsrv/display/thumbnail/320x180/catalog/crunchyroll/0e7a0ed31c2810a8efc07e45e47124ca.jpeg'}, {'width': 600, 'height': 338, 'type': 'thumbnail', 'source': 'https://beta.crunchyroll.com/imgsrv/display/thumbnail/600x338/catalog/crunchyroll/0e7a0ed31c2810a8efc07e45e47124ca.jpeg'}, {'width': 640, 'height': 360, 'type': 'thumbnail', 'source': 'https://beta.crunchyroll.com/imgsrv/display/thumbnail/640x360/catalog/crunchyroll/0e7a0ed31c2810a8efc07e45e47124ca.jpeg'}, {'width': 800, 'height': 450, 'type': 'thumbnail', 'source': 'https://beta.crunchyroll.com/imgsrv/display/thumbnail/800x450/catalog/crunchyroll/0e7a0ed31c2810a8efc07e45e47124ca.jpeg'}, {'width': 1200, 'height': 675, 'type': 'thumbnail', 'source': 'https://beta.crunchyroll.com/imgsrv/display/thumbnail/1200x675/catalog/crunchyroll/0e7a0ed31c2810a8efc07e45e47124ca.jpeg'}, {'width': 1440, 'height': 810, 'type': 'thumbnail', 'source': 'https://beta.crunchyroll.com/imgsrv/display/thumbnail/1440x810/catalog/crunchyroll/0e7a0ed31c2810a8efc07e45e47124ca.jpeg'}, {'width': 1600, 'height': 900, 'type': 'thumbnail', 'source': 'https://beta.crunchyroll.com/imgsrv/display/thumbnail/1600x900/catalog/crunchyroll/0e7a0ed31c2810a8efc07e45e47124ca.jpeg'}, {'width': 1920, 'height': 1080, 'type': 'thumbnail', 'source': 'https://beta.crunchyroll.com/imgsrv/display/thumbnail/1920x1080/catalog/crunchyroll/0e7a0ed31c2810a8efc07e45e47124ca.jpeg'}]]}, 'duration_ms': 1450099, 'is_premium_only': False, 'listing_id': '', 'subtitle_locales': ['en-US'], 'playback': 'https://pl.crunchyroll.com/asset/13b7d1a06139c49047fcb52d212368cb/v/b3c91d51a44aca33d1ab393a2b0ec83c/languages/en-US?*&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cCo6Ly9wbC5jcnVuY2h5cm9sbC5jb20vYXNzZXQvMTNiN2QxYTA2MTM5YzQ5MDQ3ZmNiNTJkMjEyMzY4Y2Ivdi9iM2M5MWQ1MWE0NGFjYTMzZDFhYjM5M2EyYjBlYzgzYy8~KiIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTYzODk0ODEyNX19fV19&Signature=Ac33o63Q-3KRoIJPSS7nshCoIULBNJq0KctpAfj6ciwh9wCXZ0OS5JEbJKsSzj4qLfl775P5yrI4hLDVU8jVpPVzeuh1oEncfJIzM3-WdrCbxTfhacjo~A4nd8KOPcHO0uLcyLJWQujGmt09IaEtL-l6gyo71-6I1z7J8lWOc0~IipQRaMgn2-D3-Iwm3re~tC69aTvANJ0D0TlCd92SNaIoYuUJI4IQqIBVEykdpP6fuw1I6AGXXqE4-oUlGDjDY9oEGEGpdpmOnLb5zRsgRvdLQU8m~aVWneQo3Sd9yE8njR3BXhcBFqI19EjTcb8ffZNmaS9EicIJvZ3lJKCqYg__&Key-Pair-Id=APKAJMWSQ5S7ZB3MF5VA', 'availability_notes': ''})
But now when I attempt to get formats, I get KeyError.
cr.get_formats(stream)
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.6/site-packages/crunchyroll_beta/init.py", line 116, in get_formats
video_url = streams["streams"]["adaptive_hls"][locale]["url"]
KeyError: 'it-IT'
Thank you 👍
from crunpyroll.
@clintm99 I updated the library, uninstall and reinstall and let me know what you think. problems should be fixed now.
from crunpyroll.
Related Issues (17)
- 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
- You need to implement this function to fix "TOO_MANY_ACTIVE_STREAMS" issue @inks007 HOT 6
- 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
- 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.