Scraping for Images, Nokogiri [closed] - html

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I'm trying to scrape for the images from a toy website and can't seem to figure out how. Please help. I'm using Nokogiri. Here's what I got so far:
webpage = Nokogiri::HTML(open(url))
section = webpage.css('div.category-products')
item_container = section.css('div.container-fluid.product-list-container')
item_list = item_container.css('.item')
list = item_list.css('.product-label-wrap')
image = section2.css('.image-product-list')
Here's the html tag:
enter image description here

You can get the element's attribute by using attr
image.css('img').attr('src')

Related

how to add a source for HTML [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 14 hours ago.
Improve this question
In HTML I need to add a source comment for where I get my information from a project. Are there any suggestions as to how to properly comment on this element on the visual studio? Like for example on the bottom of the page or make a comment?
I tried adding a <!--Source container --> <div id = "source"> in the body element but nothing really shows up.

HTML file to show as one file in browser [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 days ago.
Improve this question
I have a homework and I can not seem to combine all HTML file to show as one file in browser. I am beginner! please help I have all my codes ready but they all open seperately.
I tried frame masterfile but could not get a hold of it

How to determine format of image from page [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
What's the image format on this web page.
How to determine that? I check html code and found nothing.
Thanks for your help
https://lh6.googleusercontent.com/proxy/xZbt3v_VA_d47bCCIGK6XOufya_92N1c0MDOHLmwmczS6OaKG6jfvj9wsxCxDtW8XpBB4mBrSrnPBlJ71FAEHkOLny32TgF3bYpN1ymo3hPK4g=w3840-h2160-p-k-no-nd-mv
in present you can't do that because the static( in which images are stored) path have been secured so that not anyone can access the folders in which all images and static items have been stored

Get an attribute value in HTML [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
Please help me on this. Refer to above image.
WebElement element = driver.findElement(By.id("mod-sellerRating-9"));
String dataSellerRating = element.getAttribute("data-sellerrating");
As above, and I would use By.id rather than By.xpath.

alter form input to add <A> tags before adding to database [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want to have a 'website' input field which I want to be stored as a hfef link in a mysql table, but I can't expect users to add the href tags themselves I need it to be automatic. I guess it must be some thing to do with the input value but I don't know what what exactly. Thanks
website = "The Site";
Should work for you or
website = "" . $_POST['website'] . "";
If you want the user's input as both the text and the href part.