Advertisement
zizus89

Untitled

Mar 21st, 2023
963
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.34 KB | None | 0 0
  1. loop do
  2.   response.sync_body 5
  3.   xpath("//a[img[@class='fzg_bild']]").each do |item|
  4.     category = xpath("//h2[@class='fzg_kategorie']").text.strip
  5.       yield request(url: item[:href], callback: :parse_listing, data: { categories: category })
  6.     end
  7.   page.find(:xpath, "//li[@class='pagination-next']/a").trigger("click") rescue break
  8. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement