D
D
Dmitry Sopot2017-01-22 14:44:49
ruby
Dmitry Sopot, 2017-01-22 14:44:49

Parsing a Site in Ruby?

wrote a site parser for a product, but it takes data when you specify a link to a specific product, but it is necessary that he himself run through the entire site and collect data. Who can help?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artur Bordenyuk, 2017-01-22
@HighQuality

Why not write another parser that looks, for example, in the sitemap of the site and collects all relevant links (ie links to the product card).
At the moment when the link is needed, we create a task in delayed_job (for example), and the task itself simply executes the script that is already ready (takes a link as input).
I don't think it's worth mentioning the advantages of using queues. :)

A
alex maslakoff, 2017-01-26
@teke_teke

either give him the entire list of products, or make him parse it himself from the site.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question