jsxreqsz

Untitled

Dec 29th, 2022
2,711
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. produt_id = "BJ338851"
  2. bs4 = BeautifulSoup(html.text, "html.parser")
  3. table = bs4.find("div", {"id":"main"}).find("div", {"id":"main_inner"}).find("div", {"id":"work_left"}).find("div", {"data-product-id":str(produt_id)})
  4. slider = table.find("div", {"class":"slider_body_inner swiper-container-horizontal"}).find("ul",{"class":"slider_items trans"})
  5. rows = slider.find_all("li")
  6. for row in rows:
  7. images = row.find("source")['srcset'].split("//")[1]
  8. print(images)
  9. print("===========================================\n\n")
Advertisement
Add Comment
Please, Sign In to add comment