[extractor/ninegag] Update to 9GAG extractor
diff --git a/yt_dlp/extractor/ninegag.py b/yt_dlp/extractor/ninegag.py
index 00ca95ea2e6..86e710f2b1f 100644
--- a/yt_dlp/extractor/ninegag.py
+++ b/yt_dlp/extractor/ninegag.py
@@ -3,7 +3,7 @@
     ExtractorError,
     determine_ext,
     int_or_none,
-    try_get,
+    traverse_obj,
     unescapeHTML,
     url_or_none,
 )
@@ -11,18 +11,20 @@
 
 class NineGagIE(InfoExtractor):
     IE_NAME = '9gag'
+    IE_DESC = '9GAG'
     _VALID_URL = r'https?://(?:www\.)?9gag\.com/gag/(?P<id>[^/?&#]+)'
 
     _TESTS = [{
         'url': 'https://9gag.com/gag/ae5Ag7B',
         'info_dict': {
             'id': 'ae5Ag7B',
-            'ext': 'mp4',
+            'ext': 'webm',
             'title': 'Capybara Agility Training',
             'upload_date': '20191108',
             'timestamp': 1573237208,
+            'thumbnail': 'https://img-9gag-fun.9cache.com/photo/ae5Ag7B_460s.jpg',
             'categories': ['Awesome'],
-            'tags': ['Weimaraner', 'American Pit Bull Terrier'],
+            'tags': ['Awesome'],
             'duration': 44,
             'like_count': int,
             'dislike_count': int,
@@ -32,6 +34,26 @@ class NineGagIE(InfoExtractor):
         # HTML escaped title
         'url': 'https://9gag.com/gag/av5nvyb',
         'only_matching': True,
+    }, {
+        # Non Anonymous Uploader
+        'url': 'https://9gag.com/gag/ajgp66G',
+        'info_dict': {
+            'id': 'ajgp66G',
+            'ext': 'webm',
+            'title': 'Master Shifu! Or Splinter! You decide:',
+            'upload_date': '20220806',
+            'timestamp': 1659803411,
+            'thumbnail': 'https://img-9gag-fun.9cache.com/photo/ajgp66G_460s.jpg',
+            'categories': ['Funny'],
+            'tags': ['Funny'],
+            'duration': 26,
+            'like_count': int,
+            'dislike_count': int,
+            'comment_count': int,
+            'uploader': 'Peter Klaus',
+            'uploader_id': 'peterklaus12',
+            'uploader_url': 'https://9gag.com/u/peterklaus12',
+        }
     }]
 
     def _real_extract(self, url):
@@ -46,8 +68,6 @@ def _real_extract(self, url):
                 'The given url does not contain a video',
                 expected=True)
 
-        title = unescapeHTML(post['title'])
-
         duration = None
         formats = []
         thumbnails = []
@@ -98,7 +118,7 @@ def _real_extract(self, url):
                 formats.append(common)
         self._sort_formats(formats)
 
-        section = try_get(post, lambda x: x['postSection']['name'])
+        section = traverse_obj(post, ('postSection', 'name'))
 
         tags = None
         post_tags = post.get('tags')
@@ -110,18 +130,19 @@ def _real_extract(self, url):
                     continue
                 tags.append(tag_key)
 
-        get_count = lambda x: int_or_none(post.get(x + 'Count'))
-
         return {
             'id': post_id,
-            'title': title,
+            'title': unescapeHTML(post.get('title')),
             'timestamp': int_or_none(post.get('creationTs')),
             'duration': duration,
+            'uploader': traverse_obj(post, ('creator', 'fullName')),
+            'uploader_id': traverse_obj(post, ('creator', 'username')),
+            'uploader_url': url_or_none(traverse_obj(post, ('creator', 'profileUrl'))),
             'formats': formats,
             'thumbnails': thumbnails,
-            'like_count': get_count('upVote'),
-            'dislike_count': get_count('downVote'),
-            'comment_count': get_count('comments'),
+            'like_count': int_or_none(post.get('upVoteCount')),
+            'dislike_count': int_or_none(post.get('downVoteCount')),
+            'comment_count': int_or_none(post.get('commentsCount')),
             'age_limit': 18 if post.get('nsfw') == 1 else None,
             'categories': [section] if section else None,
             'tags': tags,

### Description of your *pull request* and other information

</details>

<!--

Explanation of your *pull request* in arbitrary form goes here. Please **make sure the description explains the purpose and effect** of your *pull request* and is worded well enough to be understood. Provide as much **context and examples** as possible

-->

Added _9GAG post uploader_ data to NineGagIE
Refactored some of NineGagIE to comply with https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#yt-dlp-coding-conventions
Updated exisiting test and added another to test the uploader data

Fixes #4587


<details open><summary>Template</summary> <!-- OPEN is intentional -->

<!--

# PLEASE FOLLOW THE GUIDE BELOW

- You will be asked some questions, please read them **carefully** and answer honestly
- Put an `x` into all the boxes `[ ]` relevant to your *pull request* (like [x])
- Use *Preview* tab to see how your *pull request* will actually look like

-->

### Before submitting a *pull request* make sure you have:
- [x] At least skimmed through [contributing guidelines](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#developer-instructions) including [yt-dlp coding conventions](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#yt-dlp-coding-conventions)
- [x] [Searched](https://github.com/yt-dlp/yt-dlp/search?q=is%3Apr&type=Issues) the bugtracker for similar pull requests
- [x] Checked the code with [flake8](https://pypi.python.org/pypi/flake8) and [ran relevant tests](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#developer-instructions)

### In order to be accepted and merged into yt-dlp each piece of code must be in public domain or released under [Unlicense](http://unlicense.org/). Check one of the following options:
- [x] I am the original author of this code and I am willing to release it under [Unlicense](http://unlicense.org/)
- [ ] I am not the original author of this code but it is in public domain or released under [Unlicense](http://unlicense.org/) (provide reliable evidence)

### What is the purpose of your *pull request*?
- [x] Fix or improvement to an extractor (Make sure to add/update tests)
- [ ] New extractor ([Piracy websites will not be accepted](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#is-the-website-primarily-used-for-piracy))
- [ ] Core bug fix/improvement
- [ ] New feature (It is strongly [recommended to open an issue first](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#adding-new-feature-or-making-overarching-changes))
