To create a README.md file for your repository, you should include information about what the project does, how to set it up, and any other relevant details. Here's a template for your README.md file:
This project is a Node.js application that scrapes Instagram profiles for specific hashtags and exports the data to a CSV file. It utilizes Puppeteer for web scraping and Node.js for server-side scripting.
-
Clone the repository:
git clone <repository-url>
-
Install dependencies:
cd instagram-scraper npm install
-
Start the server:
npm start
-
Send a POST request to
http://localhost:3000/with the following JSON payload:{ "users": ["user1", "user2"], "hashtag": "yourhashtag", "timeStamp": "yourtimestamp" }Replace
"user1", "user2"with the Instagram usernames you want to scrape,"yourhashtag"with the desired hashtag, and"yourtimestamp"with the timestamp. -
The server will respond with scraped data in JSON format.
-
To export the data to a CSV file, use the provided
jsonToCSV.jsscript. Example usage:node jsonToCSV.js
This will generate a CSV file with the scraped data.
- You can modify the port number in
index.jsby changing theportvariable. - Adjust Puppeteer settings or Instagram URL structures in
index.jsas needed.
Make sure to replace <repository-url> with the actual URL of your repository.
Feel free to add more sections or customize the README according to your project's specific requirements and features.