类似于beauthoulsoup的javascript解析变量解析HTML

2024-05-23 21:35:51 发布

您现在位置:Python中文网/ 问答频道 /正文

我不需要刮网器。在

我只想从静态js中提取一个变量。e、 g段javascript:

    $(document).ready(function(){
            has_map = true;

        new hip.Events({
            has_date_picker: false,
            has_big_button: true,
            has_map: has_map,
            map_selector: 'event-map',
            coordinates: 'POINT (-79.4004249999999985 43.6524020000000021)',
            marker_icon: 'http://s3.amazonaws.com/imageupload/static/new_media/images/map-marker.png'
        });

    });

假设我需要键marker_icon(本例中的url)的值。python中有没有库,或者我应该用一种丑陋的方式来做:regex?在


Tags: truemapnewjs静态functionjavascriptevents