Created
May 7, 2020 19:52
-
-
Save sonerb/5068ac81f8182b769ba977ebe574148a to your computer and use it in GitHub Desktop.
gittigidiyor.com product list
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
import requests | |
from bs4 import BeautifulSoup | |
def arama_yap(kelime): | |
url = "https://www.gittigidiyor.com/arama/?k=" + kelime | |
data = requests.get(url).content | |
soup = BeautifulSoup(data, "html.parser") | |
urunler = soup.select("li[class='gg-uw-6 gg-w-8 gg-d-8 gg-t-8 gg-m-24 gg-mw-12 catalog-seem-cell']") | |
for urun in urunler: | |
img_url = urun.select_one("p[class='image-container'] > img").get('sliderimg') | |
title = urun.select_one("h3 span").text | |
print("%s - %s\n\n"%(title, img_url)) | |
arama_yap("avize") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment