Skip to content

'plot' in current.get_text().lower() doesn't match all relevant headers #1

@MarcinCiura

Description

@MarcinCiura

In a similar project of mine, I used this regexp:

PLOT = [
    'Plot summary', 'Plot', 'Plot introduction',
    'Synopsis', 'Summary', 'Plot synopsis',
    'Overview', 'Story', 'Description' , 'Contents?'
]
HEADING_RE = re.compile(
    r'^ *=+\s*(%s)\s*=+' % '|'.join(PLOT),
    re.IGNORECASE | re.UNICODE | re.MULTILINE)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions