[Python] Regexp twitter handle Python

Discussão em 'Python' iniciado por Stack, Fevereiro 7, 2025.

  1. Stack

    Stack Membro Participativo

    I need to get twitter handle from different type of data

    https://twitter.com/elonmusk
    https://twitter.com/elonmusk/status/43940840234234
    https://twitter.com/elonmusk?t=w5i1O32q6dM7usSQEaTGvA&s=09
    https://twitter.com/elonmusk
    @elonmusk


    all of this should return elonmusk

    and also I can have more then 1 twitter handle in one message, so it should return all handles as list

    https://twitter.com/elonmusk https://twitter.com/elonmusk/status/43940840234234


    this should return elonmusk,elonmusk

    Continue reading...

Compartilhe esta Página