Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/swapnanildutta/instagram-search
I have used a python code to extract the details of a given username.
https://github.com/swapnanildutta/instagram-search
dataextraction webscraping
Last synced: 10 days ago
JSON representation
I have used a python code to extract the details of a given username.
- Host: GitHub
- URL: https://github.com/swapnanildutta/instagram-search
- Owner: swapnanildutta
- License: mit
- Created: 2020-04-07T07:05:55.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-04-08T00:54:31.000Z (over 1 year ago)
- Last Synced: 2024-10-07T15:48:09.110Z (about 1 month ago)
- Topics: dataextraction, webscraping
- Language: Python
- Homepage: https://pypi.org/project/ig-data/
- Size: 36.1 KB
- Stars: 3
- Watchers: 2
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![HitCount](http://hits.dwyl.com/swapnanildutta/instagram-search.svg)](http://hits.dwyl.com/swapnanildutta/instagram-search)
# Instagram Account Details Extraction
I have used a python code to extract the details of a given username, the searchDisplay() searches for the given username and prints the extracted data and the getDetails() searches for the given username and returns the extracted data in form of a dictionary.
## How to Use
Clone the repository and run the main.py file and enter a valid username as input.
## Requirements
For running this you need to have Python3 installed.Then, run the command
```bash
pip install -r requirements.txt
```This will instantly install all the libraies needed.
## Example
To install the package
```bash
pip install ig-data==0.0.2
```
To initialize an object of the package, type within the python terminal
```bash
import ig_data.InstaSearch as ig or import ig_data.InstaSearch
```
Then using the object, call the function searchDisplay()
```bash
ig.searchDisplay(*USERNAME*) or ig_data.InstaSearch.searchDisplay(*USERNAME*)
```
And the output would be```bash
Name : *NAME* Username : @*USERNAME* Followers : *FOLLOWER COUNT*
Bio : *ACCOUNT DESCRIPTION*
```Also using the object, call the function getDetails() and store the data in a dictionary
```bash
dictionary=dict()
dictionary=ig.getDetails(*USERNAME*) or dictionary=ig_data.InstaSearch.getDetails(*USERNAME*)
```
And the content of **d** would be
```bash
{'@context': 'http://schema.org', '@type': 'Person', 'name': *NAME*, 'alternateName': '@*USERNAME*', 'description': '*ACCOUNT DESCRIPTION*', 'url': '*PERSONAL URL IF ANY*', 'mainEntityofPage': {'@type': 'ProfilePage', '@id': 'https://www.instagram.com/*USERNAME*/', 'interactionStatistic': {'@type': 'InteractionCounter', 'interactionType': 'http://schema.org/FollowAction', 'userInteractionCount': '*FOLLOWER COUNT*'}}, 'image': 'https://www.instagram.com/static/images/ico/favicon-200.png/ab6eff595bb1.png'}
```