[Python] How parse Kwork.ru? [closed]

Discussão em 'Python' iniciado por Stack, Julho 8, 2025.

  1. Stack

    Stack Membro Participativo

    I have got a code, but it doesn't work. I use requests and bs4 for parsing kworks, on page of programming projects. Please give me a right answear on this request.

    import requests
    from bs4 import BeautifulSoup

    req = requests.get(f'https://kwork.ru/projects?c=11', headers={"User-Agent":"Mozilla/5.0"})
    page = BeautifulSoup(req.text, 'html.parser')

    for kwork in page.find_all('div', class_='want-card want-card--list'):
    print('founded.')
    title = kwork.find('h1', class_='wants-card__header-title breakwords pr250').find('a').get_text()
    desc = kwork.find('div', class_='wants-card__description-text br-with-lh').find('div', class_='d-inline breakwords first-letter').get_text()
    price = kwork.find('div', class_='wants-card__price').find('div', class_='d-inline').get_text()
    url = kwork.find('h1', class_='wants-card__header-title breakwords pr250').find('a').get('href')
    author = kwork.find('div', class_='dib').find('a').get_text()
    print(title, desc, price, url, author)

    Continue reading...

Compartilhe esta Página