LinkedIn Scraper is an automation tool that enables users to scrape data from LinkedIn posts by simply pasting the LinkedIn post URL. The tool extracts the data from the comments section of the post and stores it in a MongoDB database for further use. This application is built with TypeScript, Node.js, and MongoDB.
- LinkedIn Post Scraping: Extract data from LinkedIn post comments effortlessly.
- Automation: Process multiple posts with ease.
- Storage: Save scraped data in a structured MongoDB database.
- TypeScript Support: Built with TypeScript for type safety and maintainable code.
- Frontend: Next.js with TypeScript and Shadcn UI (with Tailwind CSS).
- Backend: Node.js with TypeScript.
- Database: MongoDB.
- Libraries/Modules:
puppeteer: For web scraping.mongoose: For MongoDB interactions.
Ensure you have the following installed:
- Node.js (v18.x or higher)
- MongoDB (v6.x or higher)
-
Clone the repository:
git clone https://github.com/Vinit-180/linkedin-scraper.git cd linkedin-scraper -
Install dependencies:
npm install
-
Configure environment variables:
- Create a
.envfile in the root directory. - Add the following variables:
NEXT_PUBLIC_API_URL='http://localhost:9000/api/v1/'
- Create a
-
Run the scraper:
npm run dev
- You need to do the login and needs to activate your profile.
- Paste the LinkedIn profileURN and your session key into the the modal.
- The scraper will log in to LinkedIn via your session key, extract the posts in which the user post the comments and save them to the MongoDB database.
- View the data in dashboard.
└── vinit-180-linkedin-scraper/
├── README.md
├── components.json
├── eslint.config.mjs
├── next.config.ts
├── package.json
├── postcss.config.mjs
├── tailwind.config.ts
├── tsconfig.json
├── public/
└── src/
├── app/
│ ├── globals.css
│ ├── layout.tsx
│ ├── (home)/
│ │ └── page.tsx
│ ├── dashboard/
│ │ └── page.tsx
│ ├── login/
│ │ └── page.tsx
│ ├── posts/
│ │ └── page.tsx
│ ├── profile/
│ │ └── page.tsx
│ └── signup/
│ └── page.tsx
├── components/
│ ├── Form/
│ │ └── page.tsx
│ ├── Modal/
│ │ └── page.tsx
│ ├── Navbar/
│ │ └── page.tsx
│ └── ui/
│ ├── animated-tooltip.tsx
│ ├── avatar.tsx
│ ├── button.tsx
│ ├── card.tsx
│ ├── dropdown-menu.tsx
│ ├── input.tsx
│ ├── label.tsx
│ └── skeleton.tsx
└── lib/
└── utils.ts