Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Periscope.tv: bogus uploader_id #9565

Closed
RealDolos opened this issue May 21, 2016 · 0 comments
Closed

Periscope.tv: bogus uploader_id #9565

RealDolos opened this issue May 21, 2016 · 0 comments

Comments

@RealDolos
Copy link

@RealDolos RealDolos commented May 21, 2016

  • I've verified and I assure that I'm running youtube-dl 2016.05.16
  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)

STR:

  1. Use youtube-dl with an -o template that includes uploader_id
  2. The video is saved, but the uploader_id that will be used is not the public uploader id, but the periscope internal, unreadable id, such as 1xnQrXIvKZzjY instead of some_user

Expected:

  • Use the correct public uploader id, aka the username or twitter_user_name aka the one used in urls too, and not the internal display_name, where available.
diff --git a/youtube_dl/extractor/periscope.py b/youtube_dl/extractor/periscope.py
index 0a4bc76..440fb84 100644
--- a/youtube_dl/extractor/periscope.py
+++ b/youtube_dl/extractor/periscope.py
@@ -43,7 +43,8 @@ class PeriscopeIE(InfoExtractor):
         status = broadcast['status']

         uploader = broadcast.get('user_display_name') or broadcast_data.get('user', {}).get('display_name')
-        uploader_id = broadcast.get('user_id') or broadcast_data.get('user', {}).get('id')
+        uploader_id = broadcast.get("username") or broadcast.get("twitter_username")
+        uploader_id = uploader_id or broadcast.get('user_id') or broadcast_data.get('user', {}).get('id')

         title = '%s - %s' % (uploader, status) if uploader else status
         state = broadcast.get('state').lower()

cc @dstftw

@dstftw dstftw closed this in 92d221a May 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.