Skip to content

Instagram Mentions Allows Periods #343

@juanlazarde

Description

@juanlazarde

Hi Elias,

Comments on Instagram that include mentions with periods are currently truncated on advertools.__version__ = 0.14.2.
Example: @elias.dabbas -> [@elias]

I propose adding adding a . to the MENTIONS in the REGEX module.

MENTION = re.compile(
    r"""(?i)     # case-insensitive
    (?<!\w)      # word character doesn't precede mention
    ([@@]       # either of two @ signs
    [a-z0-9_.]+)  # A to Z, numbers and underscores AND PERIODS only
    \b           # end with a word boundary
    """, re.VERBOSE)

This change works for me, but I haven't tested edge cases or other social media platforms.

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