Advertisement
zizus89

Untitled

Mar 23rd, 2023
556
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.24 KB | None | 0 0
  1. xpath("//pre").text.lines.grep(/loadProduct\(\\"(.+?)"\)/).each do |ctg|
  2.   data[:condition] = "new"
  3.   link = "/#{ctg[/loadProduct\(\\"(.+?)"\)/, 1]}"
  4.   yield request(url: link.gsub(/\\\z/i, "").strip, callback: :parse_category, data: data)
  5. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement