Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–84 unchanged (84 lines)
85
86 links = []
87
88 # Main source
89 definitions = self._parse_json(
90 self._search_regex(
91 r'mediaDefinition\s*=\s*(\[.+?\]);', webpage,
92 'media definitions', default='[]'),
93 video_id, fatal=False)
94 if definitions:
95 for definition in definitions:
96 if not isinstance(definition, dict):
97 continue
…lines 98–203 unchanged (106 lines)

After

…lines 1–84 unchanged (84 lines)
85
86 links = []
87
88 # Main source
89 definitions = self._parse_json(
90 self._search_regex(
91 r'mediaDefinition\s*[=:]\s*(\[.+?\])\s*[;,]', webpage,
92 'media definitions', default='[]'),
93 video_id, fatal=False)
94 if definitions:
95 for definition in definitions:
96 if not isinstance(definition, dict):
97 continue
…lines 98–203 unchanged (106 lines)

Before

module
future_import_statement
from "from"
__future__ "__future__"
import "import"
dotted_name
identifier "unicode_literals"
import_statement
import "import"
dotted_name
identifier "re"
import_from_statement
from "from"
relative_import
import_prefix
. "."
dotted_name
identifier "common"
import "import"
dotted_name
identifier "InfoExtractor"
import_from_statement (+26 nodes collapsed)
import_from_statement
from "from"
relative_import
import_prefix
. "."
. "."
dotted_name
identifier "aes"
import "import"
dotted_name
identifier "aes_decrypt_text"
class_definition
class "class"
identifier "YouPornIE"
argument_list
( "("
identifier "InfoExtractor"
) ")"
: ":"
block
expression_statement
assignment
identifier "_VALID_URL"
= "="
string
string_start "r'"
string_content "https?://(?:www\\.)?youporn\\.com/(?:watch|embed)/(?P<id>\\d+)("...
string_end "'"
expression_statement (+388 nodes collapsed)
decorated_definition (+29 nodes collapsed)
function_definition
def "def"
identifier "_real_extract"
parameters
( "("
identifier "self"
, ","
identifier "url"
) ")"
: ":"
block
expression_statement
assignment
identifier "mobj"
= "="
call
attribute
identifier "re"
. "."
identifier "match"
argument_list
( "("
attribute
identifier "self"
. "."
identifier "_VALID_URL"
, ","
identifier "url"
) ")"
expression_statement
assignment
identifier "video_id"
= "="
call
attribute
identifier "mobj"
. "."
identifier "group"
argument_list
( "("
string
string_start "'"
string_content "id"
string_end "'"
) ")"
expression_statement
assignment
identifier "display_id"
= "="
boolean_operator
call
attribute
identifier "mobj"
. "."
identifier "group"
argument_list
( "("
string
string_start "'"
string_content "display_id"
string_end "'"
) ")"
or "or"
identifier "video_id"
expression_statement (+38 nodes collapsed)
expression_statement (+65 nodes collapsed)
expression_statement
assignment
identifier "links"
= "="
list
[ "["
] "]"
comment "# Main source"
expression_statement
assignment
identifier "definitions"
= "="
call
attribute
identifier "self"
. "."
identifier "_parse_json"
argument_list
( "("
call
attribute
identifier "self"
. "."
identifier "_search_regex"
argument_list
( "("
string
string_start "r'"
string_content "mediaDefinition\\s*=\\s*(\\[.+?\\]);"
string_end "'"
, ","
identifier "webpage"
, ","
string
string_start "'"
string_content "media definitions"
string_end "'"
, ","
keyword_argument
identifier "default"
= "="
string
string_start "'"
string_content "[]"
string_end "'"
) ")"
, ","
identifier "video_id"
, ","
keyword_argument
identifier "fatal"
= "="
false "False"
) ")"
if_statement (+64 nodes collapsed)
comment "# Fallback #1, this also contains extra low quality 180p for"...
for_statement (+33 nodes collapsed)
comment "# Fallback #2 (unavailable as at 22.06.2017)"
expression_statement (+28 nodes collapsed)
if_statement (+38 nodes collapsed)
comment "# Fallback #3 (unavailable as at 22.06.2017)"
for_statement (+33 nodes collapsed)
comment "# Fallback #4, encrypted links (unavailable as at 22.06.2017"...
for_statement (+53 nodes collapsed)
expression_statement
assignment
identifier "formats"
= "="
list
[ "["
] "]"
for_statement (+163 nodes collapsed)
expression_statement
call
attribute
identifier "self"
. "."
identifier "_sort_formats"
argument_list
( "("
identifier "formats"
) ")"
expression_statement (+44 nodes collapsed)
expression_statement (+36 nodes collapsed)
expression_statement (+28 nodes collapsed)
expression_statement (+46 nodes collapsed)
expression_statement
assignment
identifier "age_limit"
= "="
call
attribute
identifier "self"
. "."
identifier "_rta_search"
argument_list
( "("
identifier "webpage"
) ")"
expression_statement (+33 nodes collapsed)
expression_statement (+41 nodes collapsed)
expression_statement (+33 nodes collapsed)
function_definition (+61 nodes collapsed)
expression_statement
assignment
identifier "categories"
= "="
call
identifier "extract_tag_box"
argument_list
( "("
string
string_start "r'"
string_content "(?s)Categories:.*?</[^>]+>(.+?)</div>"
string_end "'"
, ","
string
string_start "'"
string_content "categories"
string_end "'"
) ")"
expression_statement
assignment
identifier "tags"
= "="
call
identifier "extract_tag_box"
argument_list
( "("
string
string_start "r'"
string_content "(?s)Tags:.*?</div>\\s*<div[^>]+class=[\"\\']tagBoxContent[\"\\']["...
string_end "'"
, ","
string
string_start "'"
string_content "tags"
string_end "'"
) ")"
return_statement (+117 nodes collapsed)

After

module
future_import_statement
from "from"
__future__ "__future__"
import "import"
dotted_name
identifier "unicode_literals"
import_statement
import "import"
dotted_name
identifier "re"
import_from_statement
from "from"
relative_import
import_prefix
. "."
dotted_name
identifier "common"
import "import"
dotted_name
identifier "InfoExtractor"
import_from_statement (+26 nodes collapsed)
import_from_statement
from "from"
relative_import
import_prefix
. "."
. "."
dotted_name
identifier "aes"
import "import"
dotted_name
identifier "aes_decrypt_text"
class_definition
class "class"
identifier "YouPornIE"
argument_list
( "("
identifier "InfoExtractor"
) ")"
: ":"
block
expression_statement
assignment
identifier "_VALID_URL"
= "="
string
string_start "r'"
string_content "https?://(?:www\\.)?youporn\\.com/(?:watch|embed)/(?P<id>\\d+)("...
string_end "'"
expression_statement (+388 nodes collapsed)
decorated_definition (+29 nodes collapsed)
function_definition
def "def"
identifier "_real_extract"
parameters
( "("
identifier "self"
, ","
identifier "url"
) ")"
: ":"
block
expression_statement
assignment
identifier "mobj"
= "="
call
attribute
identifier "re"
. "."
identifier "match"
argument_list
( "("
attribute
identifier "self"
. "."
identifier "_VALID_URL"
, ","
identifier "url"
) ")"
expression_statement
assignment
identifier "video_id"
= "="
call
attribute
identifier "mobj"
. "."
identifier "group"
argument_list
( "("
string
string_start "'"
string_content "id"
string_end "'"
) ")"
expression_statement
assignment
identifier "display_id"
= "="
boolean_operator
call
attribute
identifier "mobj"
. "."
identifier "group"
argument_list
( "("
string
string_start "'"
string_content "display_id"
string_end "'"
) ")"
or "or"
identifier "video_id"
expression_statement (+38 nodes collapsed)
expression_statement (+65 nodes collapsed)
expression_statement
assignment
identifier "links"
= "="
list
[ "["
] "]"
comment "# Main source"
expression_statement
assignment
identifier "definitions"
= "="
call
attribute
identifier "self"
. "."
identifier "_parse_json"
argument_list
( "("
call
attribute
identifier "self"
. "."
identifier "_search_regex"
argument_list
( "("
string
string_start "r'"
string_content "mediaDefinition\\s*[=:]\\s*(\\[.+?\\])\\s*[;,]"
string_end "'"
, ","
identifier "webpage"
, ","
string
string_start "'"
string_content "media definitions"
string_end "'"
, ","
keyword_argument
identifier "default"
= "="
string
string_start "'"
string_content "[]"
string_end "'"
) ")"
, ","
identifier "video_id"
, ","
keyword_argument
identifier "fatal"
= "="
false "False"
) ")"
if_statement (+64 nodes collapsed)
comment "# Fallback #1, this also contains extra low quality 180p for"...
for_statement (+33 nodes collapsed)
comment "# Fallback #2 (unavailable as at 22.06.2017)"
expression_statement (+28 nodes collapsed)
if_statement (+38 nodes collapsed)
comment "# Fallback #3 (unavailable as at 22.06.2017)"
for_statement (+33 nodes collapsed)
comment "# Fallback #4, encrypted links (unavailable as at 22.06.2017"...
for_statement (+53 nodes collapsed)
expression_statement
assignment
identifier "formats"
= "="
list
[ "["
] "]"
for_statement (+163 nodes collapsed)
expression_statement
call
attribute
identifier "self"
. "."
identifier "_sort_formats"
argument_list
( "("
identifier "formats"
) ")"
expression_statement (+44 nodes collapsed)
expression_statement (+36 nodes collapsed)
expression_statement (+28 nodes collapsed)
expression_statement (+46 nodes collapsed)
expression_statement
assignment
identifier "age_limit"
= "="
call
attribute
identifier "self"
. "."
identifier "_rta_search"
argument_list
( "("
identifier "webpage"
) ")"
expression_statement (+33 nodes collapsed)
expression_statement (+41 nodes collapsed)
expression_statement (+33 nodes collapsed)
function_definition (+61 nodes collapsed)
expression_statement
assignment
identifier "categories"
= "="
call
identifier "extract_tag_box"
argument_list
( "("
string
string_start "r'"
string_content "(?s)Categories:.*?</[^>]+>(.+?)</div>"
string_end "'"
, ","
string
string_start "'"
string_content "categories"
string_end "'"
) ")"
expression_statement
assignment
identifier "tags"
= "="
call
identifier "extract_tag_box"
argument_list
( "("
string
string_start "r'"
string_content "(?s)Tags:.*?</div>\\s*<div[^>]+class=[\"\\']tagBoxContent[\"\\']["...
string_end "'"
, ","
string
string_start "'"
string_content "tags"
string_end "'"
) ")"
return_statement (+117 nodes collapsed)