from Hacker News

Show HN: Regular expressions for social media profiles

by lorey on 5/24/20, 9:38 AM with 2 comments

  • by lorey on 5/24/20, 9:56 AM

    Author here. For many crawling/scraping projects I wanted to extract websites' linked social media profiles, e.g. facebook, twitter, or github profiles, etc. The easiest way for me was to use regular expressions to parse the urls and extract contained information. This is a collection of these regular expressions [0]. You check the urls against these regular expressions and get the platform, username, and other information from the url back. There's also a Python library [1] and an API [2].

    [0] https://github.com/lorey/social-media-profiles-regexs

    [1] https://github.com/lorey/socials

    [2] https://github.com/lorey/socials-api

  • by schuellerpa on 5/25/20, 7:02 AM

    Looks interesting.