저는 Python에 익숙하지 않아 웹 페이지에서 주소를 가져 오기 위해 Python에서 BeautifulSoup을 사용하여 약간의 스크레이퍼를 코딩하고 있습니다. 내가 BeautifulSoup로를 사용하여 전체 내용을 가지고 그것을 enter image description hereBeautifulSoup로 파이썬에서 특정 컨텐츠를 얻는 방법은 무엇입니까?
</div>
</div>
<div data-integration-name="redux-container" data-payload='{"name":"LocationsMapList","props":{"locations":[{"id":17305,"company_id":106906,"description":"","city":"New York","country":"United States","address":"5 Crosby St 3rd Floor","state":"New York","region":"","latitude":40.719753,"longitude":-74.0001954,"hq":true,"created_at":"2015-01-19T01:32:16.317Z","updated_at":"2016-05-05T07:57:19.282Z","zip_code":"10013","country_code":"US","full_address":"5 Crosby St 3rd Floor, New York, 10013, New York, USA","dirty":false,"to_params":"new-york-us"}]},"storeName":null}' data-rwr-element="true">
의 사진을 첨부하지만 난 "full_address"의 내용을 추출하는 방법을 모르겠어요. 나는 그것이 "div"에 있음을 보았지만 다음에 무엇을해야할지 모른다.
links = soup.find_all('div')
고마워요!
(사진 대신 텍스트로 코드를 추가하십시오) – PRMoureu
내가 그것을했다. 감사! – Laura
''data-payload '' 속성은 json입니다. 그러므로'json.loads'를 사용하십시오. –