Repository: yt-dlp/yt-dlp

Issue:
[lbry] uploader, uploader_id not populated for lbry
## Checklist

- [X] I'm reporting a broken site support issue
- [X] I've verified that I'm running yt-dlp version **2021.03.01**
- [X] I've checked that all provided URLs are alive and playable in a browser
- [X] I've checked that all URLs and arguments with special characters are properly quoted or escaped
- [X] I've searched the bugtracker for similar bug reports including closed ones
- [X] I've read bugs section in FAQ


## Verbose log

```
yt-dlp --ignore-config -i -o "%(uploader)s (%(uploader_id)s)/%(upload_date)s - %(title)s - (%(duration)ss) [%(resolution)s] [%(id)s].%(ext)s" --prefer-ffmpeg --merge-output-format mkv --write-sub --all-subs --convert-subs srt --add-metadata --write-description --write-annotations --write-all-thumbnails --write-info-json --cookies youtube-cookies.txt --proxy "" -v https://odysee.com/@ElectroBOOM:9/electroboom-crew-exposed-charging:9
[debug] Command-line config: ['--ignore-config', '-i', '-o', '%(uploader)s (%(uploader_id)s)/%(upload_date)s - %(title)s - (%(duration)ss) [%(resolution)s] [%(id)s].%(ext)s', '--prefer-ffmpeg', '--merge-output-format', 'mkv', '--write-sub', '--all-subs', '--convert-subs', 'srt', '--add-metadata', '--write-description', '--write-annotations', '--write-all-thumbnails', '--write-info-json', '--cookies', 'youtube-cookies.txt', '--proxy', '', '-v', 'https://odysee.com/@ElectroBOOM:9/electroboom-crew-exposed-charging:9']
[debug] Loading archive file None
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] yt-dlp version 2021.03.01
[debug] Python version 3.9.2 (CPython 64bit) - Windows-10-10.0.19041-SP0
[debug] exe versions: ffmpeg 4.3.1-2021-01-01-full_build-www.gyan.dev, ffprobe 4.3.1-2021-01-01-full_build-www.gyan.dev
[debug] Proxy map: {}
[lbry] @ElectroBOOM#9/electroboom-crew-exposed-charging#9: Downloading stream JSON metadata
[lbry] 9c078cfb6bda3bde22bebd5d5dfc6c19084e6168: Downloading streaming url JSON metadata
[debug] Default format spec: bestvideo*+bestaudio/best
[info] Downloading format(s) 0
[info] Writing video description to: NA (NA)\20210228 - ElectroBOOM Crew EXPOSED!!! Charging Cellphone RAYS! (LATITY-004) - (870s) [1920x1080] [9c078cfb6bda3bde22bebd5d5dfc6c19084e6168].description
WARNING: There are no annotations to write.
[info] Writing video metadata as JSON to: NA (NA)\20210228 - ElectroBOOM Crew EXPOSED!!! Charging Cellphone RAYS! (LATITY-004) - (870s) [1920x1080] [9c078cfb6bda3bde22bebd5d5dfc6c19084e6168].info.json
[lbry] 9c078cfb6bda3bde22bebd5d5dfc6c19084e6168: Downloading thumbnail  ...
[lbry] 9c078cfb6bda3bde22bebd5d5dfc6c19084e6168: Writing thumbnail to: NA (NA)\20210228 - ElectroBOOM Crew EXPOSED!!! Charging Cellphone RAYS! (LATITY-004) - (870s) [1920x1080] [9c078cfb6bda3bde22bebd5d5dfc6c19084e6168].jpg
[debug] Invoking downloader on 'https://cdn.lbryplayer.xyz/api/v4/streams/free/electroboom-crew-exposed-charging/9c078cfb6bda3bde22bebd5d5dfc6c19084e6168/9f104b'
[download] Destination: NA (NA)\20210228 - ElectroBOOM Crew EXPOSED!!! Charging Cellphone RAYS! (LATITY-004) - (870s) [1920x1080] [9c078cfb6bda3bde22bebd5d5dfc6c19084e6168].mp4

```


## Description

uploader, uploader_id does not appear to be populated for lbry. you get NA instead.




Discussion:
`channel`, `channel_id` and `channel_url` works. lbry doesn't seem to have a concept of "uploader"

Example of data obtained from lbry:
```
{
  "address": "bSU6SET3Q6Qk57WhukrVMLVQrNmExbr1oA",
  "amount": "50.0",
  "canonical_url": "lbry://@Mantega#1/First-day-LBRY#1",
  "claim_id": "17f983b61f53091fb8ea58a9c56804e4ff8cff4d",
  "claim_op": "update",
  "confirmations": 120150,
  "height": 803114,
  "is_channel_signature_valid": true,
  "meta": {
    "activation_height": 800904,
    "creation_height": 800904,
    "creation_timestamp": 1595340751,
    "effective_amount": "56.12923543",
    "expiration_height": 2903304,
    "is_controlling": true,
    "reposted": 12,
    "support_amount": "6.12923543",
    "take_over_height": 800904,
    "trending_global": 0,
    "trending_group": 0,
    "trending_local": 0,
    "trending_mixed": 0.00718481931835413
  },
  "name": "First-day-LBRY",
  "normalized_name": "first-day-lbry",
  "nout": 0,
  "permanent_url": "lbry://First-day-LBRY#17f983b61f53091fb8ea58a9c56804e4ff8cff4d",
  "short_url": "lbry://First-day-LBRY#1",
  "signing_channel": {
    "address": "bFVXbndGXmooWmqCnhSaHF6tsQKU7xeEuT",
    "amount": "1.0",
    "canonical_url": "lbry://@Mantega#1",
    "claim_id": "1c8ad6a2ab4e889a71146ae4deeb23bb92dab627",
    "claim_op": "update",
    "confirmations": 6068,
    "has_signing_key": false,
    "height": 917196,
    "meta": {
      "activation_height": 786344,
      "claims_in_channel": 165,
      "creation_height": 786344,
      "creation_timestamp": 1593005939,
      "effective_amount": "3301.96913569",
      "expiration_height": 2888744,
      "is_controlling": true,
      "reposted": 3,
      "support_amount": "3300.96913569",
      "take_over_height": 786344,
      "trending_global": 0,
      "trending_group": 0,
      "trending_local": 0,
      "trending_mixed": 0.0030200171750038862
    },
    "name": "@Mantega",
    "normalized_name": "@mantega",
    "nout": 0,
    "permanent_url": "lbry://@Mantega#1c8ad6a2ab4e889a71146ae4deeb23bb92dab627",
    "short_url": "lbry://@Mantega#1",
    "timestamp": 1613936814,
    "txid": "a9639b2bbe0607327ca6759a6239b3b4701ebfef4f6e3c756d8346c609286831",
    "type": "claim",
    "value": {
      "cover": {
        "url": "https://i.postimg.cc/zfsC5DFv/GIFs-rats-capa.gif"
      },
      "description": "Hello guys,\n\nSo I'm Mantega, Circus - Surfer, living in Cape Verde Islands - Africa.\n\nI was born in Brazil, with the mission to make the world laugh, and lived many years like an analogical nomad.\n\nIn 2020 I start my journey as a digital nomad, sharing my humor and ideas in the internet.\n\nI always had a dislike social media platforms, always felt quite uncomfortable with them, until I found LBRY.\n\nSo now my idea is to try create/learn/promote as much as I can about LBRY.\n\nIt's amazing to see how much potential LBRY has and I feel really good to be part of this community.\n\nThis year (2020) has been quite difficult, with almost 100% of all my Circus gigs cancelled, so if you like my content, it would be awesome to leave some tips! ; )\n\nDiscord:Mantega#9765\n\nReddit: https://www.reddit.com/user/Mantegasurf\n\nMewe: https://mewe.com/i/mantegacircus\n\nTelegram: https://t.me/mantegacircus\n\nMinds: https://www.minds.com/mtgcrptjgglr/",
      "email": "mantega@mantega.net",
      "public_key": "3056301006072a8648ce3d020106052b8104000a0342000410c7ab682ff149f02a8979315fc4ffe6e9ecf030b1d6e35d167beb139d77d375acb2fb304d5d98b2c4092173dd55c2a2ffdf3a7c9469ca8b9f9c55d110230d50",
      "public_key_id": "bM3eYAMtV3nvVZKTe1Ti7GysaU893Nn1fn",
      "tags": [
        "comedy",
        "crypto",
        "lbry",
        "odysee",
        "funny"
      ],
      "thumbnail": {
        "url": "https://i.postimg.cc/6qS7Zfdj/1-87-double-rat.gif"
      },
      "title": "LBRY/Odysee rats united!!!",
      "website_url": "www.mantega.net"
    },
    "value_type": "channel"
  },
  "timestamp": 1595694354,
  "txid": "2c9b0cc450553fa559f9d907abbf5f89b809511f2733129c9b87b0cdca068477",
  "type": "claim",
  "value": {
    "description": "Welcome to your LBRY Journey!\n\nHere are the channels that helped me on my first days:\n\n(lbry.tv web site)\n\n1: https://lbry.tv/@LBRY_Tutor_Helper:e\n\n2: https://lbry.tv/@All-In-for-LBRY-English:a\n\n3: https://lbry.tv/@LBRYansUnited:7\n\n4: https://lbry.tv/@lbry:3f\n\n5: ?\n\n(desktop app)\n\n1: lbry://@LBRY_Tutor_Helper#e\n\n2: lbry://@All-In-for-LBRY-English#a\n\n3: lbry://@LBRYansUnited#7\n\n4: lbry://@lbry#3f\n\n5: ?\n\nPlease let me know which other channels helped you, down in the comments!\n\nAll the best my LBRY rats!\n\n---------------------------------------------------------\nTo register in LBRY and we both receive 15 LBC:\n\nhttps://lbry.tv/$/invite/@Mantega:1",
    "languages": [
      "en"
    ],
    "license": "None",
    "release_time": "1595340697",
    "source": {
      "hash": "5e573edbd81071a7cd8166a7edddf7999fef1d4f329d5e8ee2f89a7cb08689b4bf63026dd4b36af39273625d04822335",
      "media_type": "video/mp4",
      "name": "First day LBRY.mp4",
      "sd_hash": "c51aa99967055e22ab2946fd104c2ce7e2b2b62621f8c2f25ecb9f9eedc20acbf9087b0c437fa25e3629c7cf4ed2984b",
      "size": "94027711"
    },
    "stream_type": "video",
    "tags": [
      "first day in lbry",
      "lbc",
      "lbry",
      "start",
      "tutorial"
    ],
    "thumbnail": {
      "url": "https://spee.ch/7/67f2d809c263288c.png"
    },
    "title": "First day in LBRY? Start HERE!",
    "video": {
      "duration": 346,
      "height": 720,
      "width": 1280
    }
  },
  "value_type": "stream"
}
```
@bani6809 If lbry does have an "uploader" separate from "channel", please give example
Closing due to inactivity
Please consider using `signing_channel.name` as the uploader id

Resolving patch:
diff --git a/yt_dlp/extractor/lbry.py b/yt_dlp/extractor/lbry.py
--- a/yt_dlp/extractor/lbry.py
+++ b/yt_dlp/extractor/lbry.py
@@ -70,11 +70,11 @@ def _parse_stream(self, stream, url):
             'duration': ('value', stream_type, 'duration', {int_or_none}),
             'channel': ('signing_channel', 'value', 'title', {str}),
             'channel_id': ('signing_channel', 'claim_id', {str}),
+            'uploader_id': ('signing_channel', 'name', {str}),
         })
 
-        channel_name = traverse_obj(stream, ('signing_channel', 'name', {str}))
-        if channel_name and info.get('channel_id'):
-            info['channel_url'] = self._permanent_url(url, channel_name, info['channel_id'])
+        if info.get('uploader_id') and info.get('channel_id'):
+            info['channel_url'] = self._permanent_url(url, info['uploader_id'], info['channel_id'])
 
         return info
 
@@ -159,6 +159,7 @@ class LBRYIE(LBRYBaseIE):
             'height': 720,
             'thumbnail': 'https://spee.ch/7/67f2d809c263288c.png',
             'license': 'None',
+            'uploader_id': '@Mantega',
             'duration': 346,
             'channel': 'LBRY/Odysee rats united!!!',
             'channel_id': '1c8ad6a2ab4e889a71146ae4deeb23bb92dab627',
@@ -192,6 +193,7 @@ class LBRYIE(LBRYBaseIE):
             'vcodec': 'none',
             'thumbnail': 'https://spee.ch/d/0bc63b0e6bf1492d.png',
             'license': 'None',
+            'uploader_id': '@LBRYFoundation',
         }
     }, {
         'url': 'https://odysee.com/@gardeningincanada:b/plants-i-will-never-grow-again.-the:e',
@@ -210,7 +212,8 @@ class LBRYIE(LBRYBaseIE):
             'channel': 'Gardening In Canada',
             'channel_id': 'b8be0e93b423dad221abe29545fbe8ec36e806bc',
             'channel_url': 'https://odysee.com/@gardeningincanada:b8be0e93b423dad221abe29545fbe8ec36e806bc',
-            'formats': 'mincount:3',  # FIXME
+            'uploader_id': '@gardeningincanada',
+            'formats': 'mincount:3',
             'thumbnail': 'https://thumbnails.lbry.com/AgHSc_HzrrE',
             'license': 'Copyrighted (contact publisher)',
         }
@@ -235,6 +238,7 @@ class LBRYIE(LBRYBaseIE):
             'formats': 'mincount:1',
             'thumbnail': 'startswith:https://thumb',
             'license': 'None',
+            'uploader_id': '@RT',
         },
         'params': {'skip_download': True}
     }, {
@@ -249,6 +253,7 @@ class LBRYIE(LBRYBaseIE):
             'channel': 'Wicked Truths',
             'channel_id': '23d2bbf856b0ceed5b1d7c5960bcc72da5a20cb0',
             'channel_url': 'https://odysee.com/@wickedtruths:23d2bbf856b0ceed5b1d7c5960bcc72da5a20cb0',
+            'uploader_id': '@wickedtruths',
             'timestamp': 1695114347,
             'upload_date': '20230919',
             'release_timestamp': 1685617473,


Test patch: