Skip to content

rhatami/Cafebazaar_Scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

راهنمای استفاده از اسکریپت Cafebazaar Scraper

این اسکریپت با استفاده از پایتون و Selenium، نظرات یک اپلیکیشن را از سایت کافه بازار Cafebazaar.ir استخراج می‌کند. ورودی این اسکریپت آدرس صفحه اپلیکیشن شما و خروجی آن یک فایل اکسل حاوی نظرات می‌باشد.

پیش‌نیازها

  1. نصب Google Chrome: دانلود Google Chrome

  2. نصب ChromeDriver: دانلود ChromeDriver

  3. نصب Python: دانلود Python

  4. نصب Pip: راهنمای نصب Pip

راه‌اندازی

  1. نصب پکیج‌های مورد نیاز پایتون: ترمینال یا خط فرمان را باز کنید و دستورات زیر را برای نصب Selenium، BeautifulSoup4 و Pandas اجرا کنید:

    pip install selenium
    pip install beautifulsoup4
    pip install pandas
  2. ویرایش اسکریپت: فایل اسکریپت را باز کرده و مقدار متغیر url (در خط 10) را به آدرس صفحه اپلیکیشن خود در سایت Cafebazaar.ir تغییر دهید. پس از انجام این تغییر، فایل را ذخیره کنید.

    url = 'https://cafebazaar.ir/app/com.farsitel.bazaar'  # این را به آدرس صفحه اپلیکیشن خود تغییر دهید
  3. اجرای اسکریپت: اسکریپت را با استفاده از پایتون با دستور زیر اجرا کنید:

    python Cafebazaar_Scraper.py

    صبر کنید تا اجرای اسکریپت به پایان برسد. این اسکریپت یک فایل خروجی با نام comments.xlsx حاوی نظرات استخراج شده ایجاد خواهد کرد.

    از این داده ها می توان برای تحلیل های مختلفی از جمله موارد مرتبط با پردازش زبان طبیعی یا NLP استفاده کرد که دیتاهای scrap شده برخی از نرم افزارها به صورت کامل در پوشه Scraped Data در دسترس قرار گرفته است.

Cafebazaar Scraper Manual

This script scrapes the Cafebazaar.ir application page for comments using Python and Selenium. The input is the URL of your application's page, and the output is an .xlsx file containing the comments.

Prerequisites

  1. Install Google Chrome: Google Chrome Download
  2. Install ChromeDriver: ChromeDriver Download
  3. Install Python: Python Download
  4. Install Pip: Pip Installation Guide

Setup

  1. Install Required Python Packages: Open your command prompt or terminal and run the following commands to install Selenium, BeautifulSoup4, and Pandas:

    pip install selenium
    pip install beautifulsoup4
    pip install pandas
  2. Edit the Script: Open the script file and change the url variable (line 10) to your application's page address on Cafebazaar.ir. Save the file after making this change.

    url = 'https://cafebazaar.ir/app/com.farsitel.bazaar'  # Change this to your app page URL
  3. Run the Script: Run the script using Python with the following command:

    python Cafebazaar_Scraper.py

    Wait until the script finishes execution. It will create an output file named comments.xlsx containing the scraped comments.

    These data can be used for various analyses, including those related to Natural Language Processing (NLP). complete scraped data from some applications are available in the "Scraped Data" folder.

About

Cafebazaar.ir Scraper and some scraped data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages