开发者

When I scrape data from website output is nothing and then output comes in same code

These code gives me all urls I want and when want to scrape it output sometimes become nothing, I wait 5-10 second and run the code output is normal. For this problem I can not get I want. I do not know what is the problem website or code. I want to get all details which is inside url.


import requests
from bs4 import BeautifulSoup as bs
import bs4
import pandas as pd

URL = 'https://yeniemlak.az/elan/axtar?emlak=1&elan_nov=1&seher%5B%5D=0&metro%5B%5D=0&qiymet=&qiymet2=&mertebe=&mertebe2=&otaq=&otaq2=&sa开发者_如何转开发he_m=&sahe_m2=&sahe_s=&sahe_s2=&page='


base_url = 'https://yeniemlak.az/'
frames = []
for page in range(1,3):
    result = requests.get(URL + str(page))
    soup = bs(result.text, 'html.parser')
    case = soup.find_all('table', class_ = 'list')
    for fix in case:
        a_ = fix.find('a')
        urll = base_url + a_['href']
        URLL = requests.get(urll)
        soup = bs(URLL.text, 'html.parser')
        alldetailsiwantbox = soup.find_all('div', class_ = 'box')
        for az in aa:
            print(alldetailsiwantbox[0].text)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜