|
2 | 2 | 
|
3 | 3 | 
|
4 | 4 |
|
5 |
| -# URL Shortening Application in Flask |
| 5 | +# Instragam Profile Scraper in Flask |
6 | 6 |
|
7 | 7 | ## 🛠️ Description
|
8 |
| -This project is about developing a url shortening application in **Flask** and **MongoDB**. User will paste their long URLs in this application and will get a shortened url, which will redirect to the same long url once used in a browser. |
| 8 | +This project is about developing a an API in **Flask** using **Instaloader** and **Instagram's GraphQL API's** to scrape the no of likes and comments of all of the post of a public instagram profile. |
9 | 9 |
|
10 | 10 | ## ⚙️ Languages or Frameworks Used
|
11 |
| - - Flask, MongoDB |
12 |
| - - HTML, CSS, Bootstrap |
| 11 | + - Flask |
| 12 | + - Instaloader, Instgram GraphQL APIs |
13 | 13 |
|
14 | 14 |
|
15 | 15 | ## 🌟 How to run
|
16 | 16 | - ### Install all the requirements
|
17 | 17 | Run `pip install -r requirements.txt` to install all the requirements.
|
18 |
| - - ### MongoDB Setup for Project |
19 |
| - |
20 |
| - - Download monogdb from the [official website](https://www.mongodb.com/try/download/community) and setup in your local system for testing. |
21 |
| - - Once it is setup locally, try creating documents and collections in mongodb to familiarize yourself with it. |
22 |
| - - You can also download the `MongoDB Compass`, which is the GUI version of Mongo Shell. |
23 |
| - - Once all the local testing is done, you can create a free cloud version of MongoDB in [MongoDB Atlas](https://www.mongodb.com/cloud/atlas/register) and get the following credentials from the dashboard of atlas: |
24 |
| - ```bash |
25 |
| -export MONGO_URI=YOUR_MONGO_URI |
26 |
| -export MONGO_USERNAME=YOUR_MONGO_USERNAME |
27 |
| -export MONGO_PASSWORD=YOUR_MONGO_PASSWORD |
28 |
| -``` |
29 |
| - |
30 |
| - |
31 |
| -- ### Setup Environment for the project |
32 |
| - - Now create a `.env` file in your project dreictory and include the following parameters as it is :- |
33 |
| -```bash |
34 |
| -export ENVIRONMENT=local | production (choose on the basis of local or production environment) |
35 |
| -export APP_SECRET=YOUR_APP_SECRET |
36 |
| -export APP_URL=YOUR_APP_URL (the short url) |
37 |
| -export MONGO_URI=YOUR_MONGO_URI |
38 |
| -export MONGO_USERNAME=YOUR_MONGO_USERNAME |
39 |
| -export MONGO_PASSWORD=YOUR_MONGO_PASSWORD |
40 |
| -export DB_NAME=YOUR_DATABASE_NAME |
41 |
| -``` |
42 |
| - |
43 |
| -- ### Now Just, Run the project |
44 |
| - - To the run the project, go to the `bash` terminal of VSCode or any other code editor and run `./start_server.sh`. |
45 |
| - - You don't have to care about setting `.env` then yourself then. |
| 18 | + |
| 19 | +- ### Now Just, Run the project |
| 20 | + - To the run the project, go to the `bash` terminal of VSCode or any other code editor and run `./start_server.sh`. |
| 21 | + - The server would start running on `http://127.0.0.1:{port_number}`.(generally http://127.0.0.1:5000) |
| 22 | + |
| 23 | + - ### Explore the API |
| 24 | + Go to the browser/postman/thunderclient and hit the following URL http://127.0.0.1:5000/get_profile/{instagram_username} |
| 25 | + > Note: The Instagram Profile must be **public**. |
46 | 26 |
|
47 | 27 |
|
48 | 28 | ## 📺 Demo
|
49 | 29 | - Main screen of the application.
|
50 |
| - |
51 |
| -- Paste you long URL in the input. |
52 |
| - |
53 |
| -- Click on Shorten and copy the `short url` to clipboard |
54 |
| - |
55 |
| - |
56 |
| - |
| 30 | + |
| 31 | +- Result for my instagram account (**@mbsaiaditya**). |
| 32 | + |
57 | 33 |
|
58 | 34 | ## 🤖 Author
|
59 |
| - |
60 | 35 | Github - [MBSA-INFINITY](https://github.com/MBSA-INFINITY)
|
61 | 36 | LinkedIn - [MBSAIADITYA](https://www.linkedin.com/in/mbsaiaditya/)
|
62 |
| -Portfolio - [MBSA](https://mbsaiaditya.in/) |
| 37 | +Portfolio - [MBSA](https://mbsaiaditya.in/) |
| 38 | +Instagram - [MBSAIADITYA](https://instagram.com/mbsaiaditya) |
0 commit comments