Ruby's Scraper Project
Web scraping, web harvesting, or web data extraction is data scraping used for extracting data from websites. Web scraping software may access the World Wide Web directly using the Hypertext Transfer Protocol, or through a web browser. While web scraping can be done manually by a software user, the term typically refers to automated processes implemented using a bot or web crawler. It is a form of copying, in which specific data is gathered and copied from the web, typically into a central local database or spreadsheet, for later retrieval or analysis.
Personal Project - Create a scraping program in Ruby to scrap https://www.naukrigulf.com/ for te position want to scrap over and sve the data in html file.
To get a local copy up and running follow these simple example steps.
- Go to the main page of the repo.
- Press the "Code" button and get the repo link.
- Clone it using git clone.
- Ruby -v2.7.0p0
-
Open a terminal
-
Copy this code :
git clone "put the link from github repo"
-
Copy this code to install the gems :
bundle install
-
Copy this code to cd into bin directory :
cd bin
-
Run the program with this code :
ruby main.rb
- When run the scraper a list of cites will shown:
1)Abu Dhabi 2)Dubai 3)Sharjah 4)Ajman 5)Fujairah 6)Ras Al Khaimah 7)Al Ain 8)Saudi Arabia 9)Riyadh 10)Jeddah
11)Eastern Province 12)Madinah 13)Makkah 14)Yanbu 15)oman 16)Muscat 15)Salalah 16)Ahmadi 17)Doha 18)Kuwait
19)Al ahmadi 20)Qatar 21)Doha 22)Bahrain 23)Manama 24)Alexandria 25)Algeria 26)Amman 27)Baghdad 28)Beirut
29)Cairo 30)Dammam 31)Egypt 32)Middle East 33)India 34)Iraq 35)Jordan 36)Jubail 37)Sohar 38)Lebanon
39)Libyah 41)Morroco 43)Umm Al Qaiwain 44)Zufar
- Then enter the city number, eg:
Please select your choice From the countries listed above :
26
- After that it will ask you to Enter the position, eg:
Enter postion separated by space :
developer
- Then it will start scraping and show you the jobs for the position, eg:
Please be patien it could take up to 20 min depend on the country vacancies
Serching . . .
Jobs found for the postion developer is 36
You can find a visual file of your search information in :
jobs/job_listing_for_developer
- To visualize all the information about the position go to Jobs directory.
-
If there is no position for the search in the city try to select a country, eg:
26, 1, 8, 29 0r 35
``` Please be patient it could take up to 20 min depend on the country vacancies Searching . . . Jobs found for the position developer is 0 ```
- Ruby v.2.7.0p0
- Using Linters for Ruby Rubocop.
- Using Bundler.
👤 Sanad Walid Abujbara
- Github: @sanadwj
- Twitter: @sandooog
- Linkedin: sanad-abujbara
Contributions, issues and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
- Hat tip to anyone whose code was used
- Inspiration
- etc
This project is MIT licensed.