Social Account Detection and Extraction for Python
- Free software: GNU General Public License v3
- Documentation: https://socials.readthedocs.io.
- Source: https://github.com/lorey/socials
- Detect and extract URLs of social accounts: throw in URLs, get back URLs of social media profiles by type.
- Currently supports Facebook, Twitter, LinkedIn, GitHub, and Emails.
Install it with pip install socials
and use it as follows:
>>> hrefs = ['https://facebook.com/peterparker', 'https://techcrunch.com', 'https://github.com/lorey']
>>> socials.extract(hrefs).get_matches_per_platform()
{'github': ['https://github.com/lorey'], 'facebook': ['https://facebook.com/peterparker']}
>>> socials.extract(hrefs).get_matches_for_platform('github')
['https://github.com/lorey']
Read more about usage in our documentation.
There's also an API called Socials API that allows you to use the functionality via REST. You can use a free online version, try it in the browser, or deploy it yourself.
- Create virtual envirenment
venv
withvirtualenv -p /usr/bin/python3 venv
. - Activate the environment with
source venv/bin/activate
. - Install the development requirements with
pip install -r requirements-dev.txt
. - Run the tests:
tox
orpython setup.py test
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.