Repository: ytdl-org/youtube-dl

Issue:
unable to extract OpenGraph description
## Please follow the guide below

- You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly
- Put an `x` into all the boxes [ ] relevant to your *issue* (like this: `[x]`)
- Use the *Preview* tab to see what your issue will actually look like

---

### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2018.07.10*. If it's not, read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected.
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2018.07.10**

### Before submitting an *issue* make sure you have:
- [x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
- [x] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

### What is the purpose of your *issue*?
- [x] Bug report (encountered problems with youtube-dl)
- [ ] Site support request (request for adding support for a new site)
- [ ] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other

---

### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your *issue*

---

### If the purpose of this *issue* is a *bug report*, *site support request* or you are not completely sure provide the full verbose output as follows:

Add the `-v` flag to **your command line** you run youtube-dl with (`youtube-dl -v <your command line>`), copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```):

```
youtube-dl --restrict-filenames --verbose http://www.dailymotion.com/embed/video/k15VG8VBLBJGhirmSxU
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--restrict-filenames', '--verbose', 'http://www.dailymotion.com/embed/video/k15VG8VBLBJGhirmSxU']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.07.10
[debug] Python version 3.6.6 (CPython) - Linux-4.17.5-1-ARCH-x86_64-with-arch
[debug] exe versions: ffmpeg 4.0.1, ffprobe 4.0.1, rtmpdump 2.4
[debug] Proxy map: {}
[dailymotion] k15VG8VBLBJGhirmSxU: Downloading webpage
WARNING: unable to extract OpenGraph description; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[dailymotion] k15VG8VBLBJGhirmSxU: Downloading m3u8 information
[dailymotion] k15VG8VBLBJGhirmSxU: Downloading m3u8 information
[dailymotion] k15VG8VBLBJGhirmSxU: Downloading m3u8 information
[dailymotion] k15VG8VBLBJGhirmSxU: Downloading m3u8 information
[dailymotion] k15VG8VBLBJGhirmSxU: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'https://www.dailymotion.com/cdn/H264-848x480/video/x6orzta.mp4?auth=1531753224-2562-c58gum1s-825ed91fd3f34d931fc1842dad29cbef'
[download] Destination: vidasopostas84-k15VG8VBLBJGhirmSxU.mp4
[download]   0.2% of 242.23MiB at 387.81KiB/s ETA 10:38

...
<end of log>
```

---


---

### Description of your *issue*, suggested solution and other information

While downloading a Dailymotion video I get the following error:

WARNING: unable to extract OpenGraph description; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

The video then downloads normally. As requested by the warning I'm filing the bug report here.



Discussion:
No meta-og tags in code, instead:
`<meta name="description" content="This video is private." />`

Resolving patch:
diff --git a/youtube_dl/extractor/dailymotion.py b/youtube_dl/extractor/dailymotion.py
--- a/youtube_dl/extractor/dailymotion.py
+++ b/youtube_dl/extractor/dailymotion.py
@@ -144,7 +144,8 @@ def _real_extract(self, url):
 
         age_limit = self._rta_search(webpage)
 
-        description = self._og_search_description(webpage) or self._html_search_meta(
+        description = self._og_search_description(
+            webpage, default=None) or self._html_search_meta(
             'description', webpage, 'description')
 
         view_count_str = self._search_regex(


Test patch: