+TITLE_RE = r'<h1>([^<]+)</h1>'
+# ...some lines of code...
+title = self._html_search_regex(TITLE_RE, webpage, 'title')
+# ...some lines of code...
+return {
+ 'title': title,
+ # ...some lines of code...
+}
+```
+
+
+### Collapse fallbacks
+
+Multiple fallback values can quickly become unwieldy. Collapse multiple fallback values into a single expression via a list of patterns.
+
+#### Example
+
+Good:
+
+```python
+description = self._html_search_meta(
+ ['og:description', 'description', 'twitter:description'],
+ webpage, 'description', default=None)
+```
+
+Unwieldy:
+
+```python
+description = (
+ self._og_search_description(webpage, default=None)
+ or self._html_search_meta('description', webpage, default=None)
+ or self._html_search_meta('twitter:description', webpage, default=None))
+```
+
+Methods supporting list of patterns are: `_search_regex`, `_html_search_regex`, `_og_search_property`, `_html_search_meta`.
+
+
+### Trailing parentheses
+
+Always move trailing parentheses used for grouping/functions after the last argument. On the other hand, multi-line literal list/tuple/dict/set should closed be in a new line. Generators and list/dict comprehensions may use either style
+
+#### Examples
+
+Correct:
+
+```python
+url = traverse_obj(info, (
+ 'context', 'dispatcher', 'stores', 'VideoTitlePageStore', 'data', 'video', 0, 'VideoUrlSet', 'VideoUrl'), list)
+```
+Correct:
+
+```python
+url = traverse_obj(
+ info,
+ ('context', 'dispatcher', 'stores', 'VideoTitlePageStore', 'data', 'video', 0, 'VideoUrlSet', 'VideoUrl'),
+ list)
+```
+
+Incorrect:
+
+```python
+url = traverse_obj(
+ info,
+ ('context', 'dispatcher', 'stores', 'VideoTitlePageStore', 'data', 'video', 0, 'VideoUrlSet', 'VideoUrl'),
+ list
+)
+```
+
+Correct:
+
+```python
+f = {
+ 'url': url,
+ 'format_id': format_id,
+}
+```
+
+Incorrect:
+
+```python
+f = {'url': url,
+ 'format_id': format_id}
+```
+
+Correct:
+
+```python
+formats = [process_formats(f) for f in format_data
+ if f.get('type') in ('hls', 'dash', 'direct') and f.get('downloadable')]
+```
+
+Correct:
+
+```python
+formats = [
+ process_formats(f) for f in format_data
+ if f.get('type') in ('hls', 'dash', 'direct') and f.get('downloadable')
+]
+```
+
+
+### Use convenience conversion and parsing functions
+
+Wrap all extracted numeric data into safe functions from [`yt_dlp/utils/`](yt_dlp/utils/): `int_or_none`, `float_or_none`. Use them for string to number conversions as well.
+
+Use `url_or_none` for safe URL processing.
+
+Use `traverse_obj` and `try_call` (superseeds `dict_get` and `try_get`) for safe metadata extraction from parsed JSON.
+
+Use `unified_strdate` for uniform `upload_date` or any `YYYYMMDD` meta field extraction, `unified_timestamp` for uniform `timestamp` extraction, `parse_filesize` for `filesize` extraction, `parse_count` for count meta fields extraction, `parse_resolution`, `parse_duration` for `duration` extraction, `parse_age_limit` for `age_limit` extraction.
+
+Explore [`yt_dlp/utils/`](yt_dlp/utils/) for more useful convenience functions.
+
+#### Examples
+
+```python
+description = traverse_obj(response, ('result', 'video', 'summary'), expected_type=str)
+thumbnails = traverse_obj(response, ('result', 'thumbnails', ..., 'url'), expected_type=url_or_none)
+video = traverse_obj(response, ('result', 'video', 0), default={}, expected_type=dict)