]> jfr.im git - yt-dlp.git/blobdiff - CONTRIBUTING.md
[cleanup] Use `_html_extract_title`
[yt-dlp.git] / CONTRIBUTING.md
index 1897f73e02a01b4f21f037bb08d404be2157ff8b..ea1893d15ac1fb7454d7f294abc5122b6375fd64 100644 (file)
@@ -534,13 +534,13 @@ #### Example
 Correct:
 
 ```python
-title = self._html_search_regex(r'<title>([^<]+)</title>', webpage, 'title')
+title = self._html_search_regex(r'<h1>([^<]+)</h1>', webpage, 'title')
 ```
 
 Incorrect:
 
 ```python
-TITLE_RE = r'<title>([^<]+)</title>'
+TITLE_RE = r'<h1>([^<]+)</h1>'
 # ...some lines of code...
 title = self._html_search_regex(TITLE_RE, webpage, 'title')
 ```