从包含java的网站中提取网站数据

问题描述 投票:0回答:1

我如何从该网站提取数据: https://maroof.sa/businesses/details/229217

我是刮擦初学者。

python beautifulsoup scrapy
1个回答
0
投票
import requests
from bs4 import BeautifulSoup

def get_content(url):

    response = requests.get(url)
    html_content = response.text

    soup = BeautifulSoup(html_content, 'html.parser')

    # Here you have to write code to retrieve information from html 

    return soup

if __name__ == '__main__':
    url = 'https://maroof.sa/businesses/details/229217'
    get_content(url)    
© www.soinside.com 2019 - 2024. All rights reserved.