require 'open-uri'
require 'nokogiri'
url = "https://grofers.com/cn/grocery-staples/cid/16"
response = open(url).read
parsed_data = Nokogiri::HTML(response)
results = []
content = parsed_data.css('.section-right').css('.products products--grid').each do |row|
title = row.css('a.product__wrapper').text
puts title
results << content
end
Web Crawling. Not able to crawl the data correctly
68 Views Asked by Ani At
0
There are 0 best solutions below
Related Questions in RUBY
- how to integrate cashfree payment gateway in ruby on rails project
- RSpec Capybara throwing Selenium error when trying to click a button with browser confirm
- Duplicate GET requests - Rails & Heroku
- convert csv file with json data inside to a column, rows table in 2nd csv file
- Installing dependencies from a gemspec file
- Verifying Google Identity OAuth2 token with Ruby
- Java code of AES/GCM/NoPadding encryption algorithm with authentication tag
- How to fix error in model with gem lockbox
- Cannot install Ruby Gem on Window
- use logstash filter ,aes gcm encrypted in ruby,but cannot decrypted in java
- In Rails 7, what is the right ActiveRecord callback to use if I need to prevent (or rollback) persistance on error?
- How can I go through an array and still remove elements from it
- Nokogiri only returning 5 results
- How do I get the fullscreen mode in firefox?
- undefined group option when using branch reset group regex in Ruby
Related Questions in WEB-SCRAPING
- Using Puppeteer to scrape a public API only when the data changes
- Scraping information in a span located under nested span
- How to scrape website which loads json content dynamically?
- How can I find a button element and click on it?
- WebScraping doesnt work, even without error
- Need Help Extracting Redirect URL from a div Element with Specific Class Name in Python Selenium
- beautifulsoup library not showing below #document data inside iframe tag in python
- how to create robust scraper for specific website without updating code after develop?
- Optimizing Selenium script for faster execution
- Parse Dynamic Power BI table with selenium
- How to extract table from webpage that requires click/toggle?
- SSL Certificate Verification Error When Scraping Website and Inserting Data into MongoDB
- Scraping all links using BeautifulSoup
- How do I make it so all arrays are the same length?
- I am getting 'NoneType object is not subscriptable' error in web scraping method
Related Questions in WEB-CRAWLER
- How do i get the newly opened page after a form submission using puppeteer
- How to crawl 5000 different URLs to find certain links
- Selenium cannot load a page
- FaceBook-Scraper (without API) works nicely - but Login Process failes some how
- Why scrapy shell did not return an output?
- Highcharts Spider Chart with different scale for each category
- Chrome for Testing crashes soon after launching chrome driver in script
- Permission denied When deploy Splash in OpenShift
- scrape( n ′ gcontent−serverapp ′ , ′ How to scrape HTML elements with a specific attribute using Python ′ )
- Puppeteer recognized by BET365 during crawler
- Python requests.get(url) returns empty content in Colab
- I want some of the content in my page to be crawlable but should not be indexed
- Selenium crawler had no problems starting up locally, but it always failed to start up on Linux,org.openqa.selenium.interactions.Coordinates
- Website Branch address not updating in Google search engine even after 1 month
- How can I execute javasript function before page load for search engine crawlers?
Related Questions in NOKOGIRI
- Nokogiri only returning 5 results
- Bundle install is failing with gem nokogiri error
- No versions of nokogiri compatible with my Ruby
- Select all html elements of a particular type that come after a specific element
- migration to OGA from nokogiri
- Select only the bottom of nested divs, without knowing how nested they are
- How would I scrape a Google Map link to get info about Resturant
- Ruby Nokogiri::XML::SyntaxError Tag figure invalid, but tag appears to be free of errors
- Using Nokogiri to scrape element from a web page with ruby
- Invoke-WebRequest -Method POST -Uri http://localhost:4242/create-payment-intent doesnt work when trying to pass total with openuri,nokogiri
- Installing nokogiri on Pi Zero
- Having difficulty with CSS selector for multiple possibilities
- Decoding Amazon Reports in CP932 with Ruby
- How to extract the word Default from this xml?
- How to see if one Nokogiri::XML::Node contains parts of another Nokogiri::XML::Node?
Related Questions in OPEN-URI
- Get the file size of a URL in Ruby
- Invoke-WebRequest -Method POST -Uri http://localhost:4242/create-payment-intent doesnt work when trying to pass total with openuri,nokogiri
- Ruby OpenURI allow redirections from https to http
- Webp image upload issue in paperclip gem in ruby on rails
- not able to download image or video file from url in ruby
- Rails new command fails if -m template is applied: "NoMethodError: private method `open' called for URI:Module"
- how to get the image from the url without downloading it but store it in a variable in ruby
- How to use proxy when using URI.open in Ruby on Rails
- Warning message with Nokogiri and Open-Uri
- How to fix "Errno::ENOENT: No such file or directory @ rb_sysopen"?
- Only OpenURI succeeds at Reddit API request
- Fastest Net::HTTP/Net::HTTPS wrapper for Ruby
- How can I open an App using it own background service
- Ruby open-uri can't open url (m1 mac)
- Disable caching in open-uri
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?