Repository: yt-dlp/yt-dlp

Issue:
GCN (global cycling network)
### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field

### Checklist

- [X] I'm reporting a new site support request
- [X] I've verified that I'm running yt-dlp version **2023.03.04** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that none of provided URLs [violate any copyrights](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#is-the-website-primarily-used-for-piracy) or contain any [DRM](https://en.wikipedia.org/wiki/Digital_rights_management) to the best of my knowledge
- [X] I've searched [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [X] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and am willing to share it if required

### Region

UK

### Example URLs

https://plus.globalcyclingnetwork.com/watch/1397691



### Provide a description that is worded well enough to be understood

Would love to be able to download videos from GCN offline. It requires a username and password

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [X] If using API, add `'verbose': True` to `YoutubeDL` params instead
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
# yt-dlp https://plus.globalcyclingnetwork.com/watch/the-athertons-mountain-bikings-fastest-family --cookies --verbose
[generic] Extracting URL: https://plus.globalcyclingnetwork.com/watch/the-athertons-mountain-bikings-fastest-family
[generic] the-athertons-mountain-bikings-fastest-family: Downloading webpage
WARNING: [generic] Falling back on generic information extractor
[generic] the-athertons-mountain-bikings-fastest-family: Extracting information
ERROR: Unsupported URL: https://plus.globalcyclingnetwork.com/watch/the-athertons-mountain-bikings-fastest-family
```



Discussion:
add verbose log with `--cookies-from-browser` or `--cookies` options being passed
Edited to add verbose log
You need to pass an argument with the `--cookies` option, e.g. `--cookies cookies.txt`

in the log you posted, yt-dlp interpreted `--cookies --verbose` as `--verbose` being the filename of your cookies file, and there was no verbose output (and no cookies were passed)
Oh ok. That makes sense. 

Wouldn't have a clue how to pull the cookies from GCN though.
Ok, 

I think I was able to figure the cookie thing out. So here's a verbose log (hopefully I've got it right)

```
yt-dlp https://plus.globalcyclingnetwork.com/watch/1397691 --cookies cookie.txt --verbose
[debug] Command-line config: ['https://plus.globalcyclingnetwork.com/watch/1397691', '--cookies', 'cookie.txt', '--verbose']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.03.04 [392389b7d] (pip)
[debug] Python 3.10.4 (CPython x86_64 64bit) - Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.35 (OpenSSL 3.0.2 15 Mar 2022, glibc 2.35)
[debug] exe versions: ffmpeg 4.4.2 (setts), ffprobe 4.4.2
[debug] Optional libraries: Cryptodome-3.18.0, brotli-1.0.9, certifi-2020.06.20, mutagen-1.46.0, secretstorage-3.3.1, sqlite3-2.6.0, websockets-11.0.3
[debug] Proxy map: {}
[debug] Loaded 1786 extractors
[generic] Extracting URL: https://plus.globalcyclingnetwork.com/watch/1397691
[generic] 1397691: Downloading webpage
WARNING: [generic] Falling back on generic information extractor
[generic] 1397691: Extracting information
[debug] Looking for embeds
ERROR: Unsupported URL: https://plus.globalcyclingnetwork.com/watch/1397691
Traceback (most recent call last):
  File "/home/pete/.local/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1518, in wrapper
    return func(self, *args, **kwargs)
  File "/home/pete/.local/lib/python3.10/site-packages/yt_dlp/YoutubeDL.py", line 1594, in __extract_info
    ie_result = ie.extract(url)
  File "/home/pete/.local/lib/python3.10/site-packages/yt_dlp/extractor/common.py", line 694, in extract
    ie_result = self._real_extract(url)
  File "/home/pete/.local/lib/python3.10/site-packages/yt_dlp/extractor/generic.py", line 2510, in _real_extract
    raise UnsupportedError(url)
yt_dlp.utils.UnsupportedError: Unsupported URL: https://plus.globalcyclingnetwork.com/watch/1397691
```
The trouble with GCN is I can skim the videos files through video downloader helper. 

It gives various video only downloads and then lists about 10-15 audio streams, all of which are about 5 seconds long so manually downloading them all and then stitching them together isn't really an option but I just can't figure out a way to get them to automatically download them all and stitch them together themselves.


Resolving patch:
diff --git a/yt_dlp/extractor/_extractors.py b/yt_dlp/extractor/_extractors.py
--- a/yt_dlp/extractor/_extractors.py
+++ b/yt_dlp/extractor/_extractors.py
@@ -497,6 +497,7 @@
     DiscoveryPlusItalyIE,
     DiscoveryPlusItalyShowIE,
     DiscoveryPlusIndiaShowIE,
+    GlobalCyclingNetworkPlusIE,
 )
 from .dreisat import DreiSatIE
 from .drbonanza import DRBonanzaIE
diff --git a/yt_dlp/extractor/dplay.py b/yt_dlp/extractor/dplay.py
--- a/yt_dlp/extractor/dplay.py
+++ b/yt_dlp/extractor/dplay.py
@@ -65,6 +65,7 @@ def _download_video_playback_info(self, disco_base, video_id, headers):
         return streaming_list
 
     def _get_disco_api_info(self, url, display_id, disco_host, realm, country, domain=''):
+        country = self.get_param('geo_bypass_country') or country
         geo_countries = [country.upper()]
         self._initialize_geo_bypass({
             'countries': geo_countries,
@@ -1001,3 +1002,39 @@ class DiscoveryPlusIndiaShowIE(DiscoveryPlusShowBaseIE):
     _SHOW_STR = 'show'
     _INDEX = 4
     _VIDEO_IE = DiscoveryPlusIndiaIE
+
+
+class GlobalCyclingNetworkPlusIE(DiscoveryPlusBaseIE):
+    _VALID_URL = r'https?://plus\.globalcyclingnetwork\.com/watch/(?P<id>\d+)'
+    _TESTS = [{
+        'url': 'https://plus.globalcyclingnetwork.com/watch/1397691',
+        'info_dict': {
+            'id': '1397691',
+            'ext': 'mp4',
+            'title': 'The Athertons: Mountain Biking\'s Fastest Family',
+            'description': 'md5:75a81937fcd8b989eec6083a709cd837',
+            'thumbnail': 'https://us1-prod-images.disco-api.com/2021/03/04/eb9e3026-4849-3001-8281-9356466f0557.png',
+            'series': 'gcn',
+            'creator': 'Gcn',
+            'upload_date': '20210309',
+            'timestamp': 1615248000,
+            'duration': 2531.0,
+            'tags': [],
+        },
+        'skip': 'Subscription required',
+        'params': {'skip_download': 'm3u8'},
+    }]
+
+    _PRODUCT = 'web'
+    _DISCO_API_PARAMS = {
+        'disco_host': 'disco-api-prod.globalcyclingnetwork.com',
+        'realm': 'gcn',
+        'country': 'us',
+    }
+
+    def _update_disco_api_headers(self, headers, disco_base, display_id, realm):
+        headers.update({
+            'x-disco-params': f'realm={realm}',
+            'x-disco-client': f'WEB:UNKNOWN:{self._PRODUCT}:27.3.2',
+            'Authorization': self._get_auth(disco_base, display_id, realm),
+        })


Test patch: