Last active
October 20, 2015 14:30
-
-
Save jaturken/a40f1d9140199595e922 to your computer and use it in GitHub Desktop.
1234
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
products_data = page_content.xpath("//div[contains(@class, 'snippet-list')]/div[contains(@class, 'snippet-card')]") | |
products_data.map do |product_data| | |
name = product_data.xpath(".//span[@clas='snippet-card__header-text']").text | |
url = product_data.xpath(".//a[span[@class='snippet-card__header-text']]/@href").text | |
is_new = !product_data.xpath(".//div[@class='stickers__sticker stickers__sticker_type_new']").empty? | |
products_names << name | |
products_utls << url | |
products_new_one << is_new | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment