The Ruby script is a web scraping tool. it's scrape discussions from GitHub based on a specified search query. It extracts discussion content and associated comments, organizing the data into a CSV file for further analysis or storage.
To use this script, follow these steps:
- Save the provided Ruby script into a file named github_comments.rb.
- Ensure you have Ruby installed on your system.
- Open a terminal or command prompt and navigate to the directory where github_comments.rb is saved.
- Run the script using the command ruby github_comments.rb.
- The script will prompt you to enter a comment word. Provide the desired keyword for searching discussions on GitHub.
- The script will start crawling GitHub discussions based on the provided keyword, scrape the content, and store the data in a CSV file named with a timestamp and the search query.
Steps for Clone Repository
(Run this Command in Terminal)
$ git clone https://github.com/shubhamp1/GitHub_discussion_scraper.git
$ cd GitHub_discussion_scraper
$ ruby github_comments.rb