test123
  • test123
  • 3 yıl önce sordu
  • Merhabalar, normalde bu kodlarla verileri çekebiliyordum ancak şu an hata bile dönmüyor. Sebebini bulamadım :(


    Yazılım Soru - Kod Kısmı

    import requests
    from bs4 import BeautifulSoup
    import json
    import time
    
    returnResponse = [];
    
    for pageNumber in range(10):
     
        url = "https://suchen.mobile.de/fahrzeuge/search.html?damageUnrepaired=ALSO_DAMAGE_UNREPAIRED&isSearchRequest=true&od=down&pageNumber=" + str(pageNumber + 1)
    
        response = requests.get(url, verify=False).content
    
        soup = BeautifulSoup(response, "html.parser")
    
     
        carList = soup.find_all('div', {'class': 'cBox-body cBox-body--resultitem'})
    
        for car in carList:
            carName = car.find("span",{"class":"h3 u-text-break-word"}).text
    
            carPrice = car.find("span",{"class":"h3 u-block"}).text
    
            carPrice = carPrice.replace("\xa0", " ");
    
            returnResponse.append({
                'carName': carName,
                'carPrice': carPrice
            })
    
        time.sleep(10)
    
    #jsonFormattedString = json.dumps(returnResponse, indent=2)
    
    
    #fileManager = open('result.json', 'a')
    #fileManager.write(jsonFormattedString)
    #fileManager.close()

    Cevaplar(0)

    Cevap yazabilmek için Giriş yapmalısınız.Giriş yapmak için buraya Tıklayın.

    Kodlarınızı aşağıdaki alana yapıştırın.

  • Kod Ekle İptal Et
  • Üyeler
    Blog
    Hakkında
    Lab
    Gece Modu
    Giriş Yap
    Kayıt Ol
  • Giriş Yap
  • Şifremi unuttum
  • Kayıt olmak için tıklayın!