home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
OnlineVideos
Youtube is broken...
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Herr R aus B" data-source="post: 1135554" data-attributes="member: 62807"><p>hi</p><p></p><p>took a look into how they do it in kodi (former xbmc) - found this:</p><p></p><p>[code] def get_uploaded_videos_of_subscriptions(self, start_index=0):</p><p> params = {'max-results': str(self._max_results),</p><p> 'alt': 'json'}</p><p> if start_index > 0:</p><p> params['start-index'] = str(start_index)</p><p> pass</p><p> return self._perform_v2_request(method='GET', path='feeds/api/users/default/newsubscriptionvideos',</p><p> params=params)[/code]</p><p></p><p>i think this here</p><p></p><p><span style="font-family: 'Courier New'"><span style="font-size: 18px"><strong><span style="color: #ff8000">feeds/api/users/default/</span><span style="color: #ff0000">new</span><span style="color: #ff8000">subscriptionvideos</span></strong></span></span></p><p></p><p>might be the real interesting part...</p><p></p><p>as for processing this V2 request i found:</p><p></p><p>[code] def _perform_v2_request(self, method='GET', headers=None, path=None, post_data=None, params=None,</p><p> allow_redirects=True):</p><p> # params</p><p> if not params:</p><p> params = {}</p><p> pass</p><p> _params = {'key': self._config['key']}</p><p> _params.update(params)</p><p></p><p> # headers</p><p> if not headers:</p><p> headers = {}</p><p> pass</p><p> _headers = {'Host': 'gdata.youtube.com',</p><p> 'X-GData-Key': 'key=%s' % self._config['key'],</p><p> 'GData-Version': '2.1',</p><p> 'Accept-Encoding': 'gzip, deflate',</p><p> 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.36 Safari/537.36'}</p><p> if self._access_token:</p><p> _headers['Authorization'] = 'Bearer %s' % self._access_token</p><p> pass</p><p> _headers.update(headers)</p><p></p><p> # url</p><p> url = 'https://gdata.youtube.com/%s/' % path.strip('/')</p><p></p><p> result = None</p><p> if method == 'GET':</p><p> result = requests.get(url, params=_params, headers=_headers, verify=False, allow_redirects=allow_redirects)</p><p> pass</p><p></p><p> if result is None:</p><p> return {}</p><p></p><p> if method != 'DELETE' and result.text:</p><p> return result.json()</p><p> pass[/code]</p><p>even though it's denoted as being a V2 api call (probably...) it actually works a treat on my current kodi installation where i also copied these code snippets from. maybe thats of any help, as i'd love to have the new videos back - as i am losing track of all my subscriptions... <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p>and once again thanks for the nice plugin and all the efforts!</p><p></p><p>Regards</p><p></p><p>Axel</p></blockquote><p></p>
[QUOTE="Herr R aus B, post: 1135554, member: 62807"] hi took a look into how they do it in kodi (former xbmc) - found this: [code] def get_uploaded_videos_of_subscriptions(self, start_index=0): params = {'max-results': str(self._max_results), 'alt': 'json'} if start_index > 0: params['start-index'] = str(start_index) pass return self._perform_v2_request(method='GET', path='feeds/api/users/default/newsubscriptionvideos', params=params)[/code] i think this here [FONT=Courier New][SIZE=5][B][COLOR=#ff8000]feeds/api/users/default/[/COLOR][COLOR=#ff0000]new[/COLOR][COLOR=#ff8000]subscriptionvideos[/COLOR][/B][/SIZE][/FONT] might be the real interesting part... as for processing this V2 request i found: [code] def _perform_v2_request(self, method='GET', headers=None, path=None, post_data=None, params=None, allow_redirects=True): # params if not params: params = {} pass _params = {'key': self._config['key']} _params.update(params) # headers if not headers: headers = {} pass _headers = {'Host': 'gdata.youtube.com', 'X-GData-Key': 'key=%s' % self._config['key'], 'GData-Version': '2.1', 'Accept-Encoding': 'gzip, deflate', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.36 Safari/537.36'} if self._access_token: _headers['Authorization'] = 'Bearer %s' % self._access_token pass _headers.update(headers) # url url = 'https://gdata.youtube.com/%s/' % path.strip('/') result = None if method == 'GET': result = requests.get(url, params=_params, headers=_headers, verify=False, allow_redirects=allow_redirects) pass if result is None: return {} if method != 'DELETE' and result.text: return result.json() pass[/code] even though it's denoted as being a V2 api call (probably...) it actually works a treat on my current kodi installation where i also copied these code snippets from. maybe thats of any help, as i'd love to have the new videos back - as i am losing track of all my subscriptions... :) and once again thanks for the nice plugin and all the efforts! Regards Axel [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
OnlineVideos
Youtube is broken...
Contact us
RSS
Top
Bottom