250x250
반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 비밀번호변경
- Python
- linux명령어
- 지방사람이보는서울사람
- db
- Django
- Git
- 나만의주식5법칙
- git 업로드
- 클라우드
- UPSERT
- 중용
- php
- 다산의마지막습관
- ChatGPT
- 헬레나크로닌
- 공작과개미
- todolist
- 꼭읽어봐야할책
- OpenCV
- 훌륭한모국어
- 일일투자금액
- 서울로가자
- 성선택
- Face Detection
- delete
- 옹졸함
- MySQL
- 독후감
- 네인생우습지않다
Archives
- Today
- Total
Terry Very Good
[C#, RPA] web Request payload, header 전송에 사용되는 json파일 만들기 본문
728x90
반응형
/* Header 만들기 */
reqHeader =New Dictionary(of String, String);
reqHeader("User-Agent") = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.33";
reqHeader("Origin") = "https://m.place.naver.com";
reqHeader("Referer") = "https://m.place.naver.com/place/list?query="+키워드+"&level=top";
reqHeader("x-wtm-graphql") = "eyJhcmciOiLqtJHso7zsiqTtgazrprDqs6jtlIQiLCJ0eXBlIjoicGxhY2UiLCJzb3VyY2UiOiJwbGFjZSJ9";
/* Payload 만들기 */
reqPayload = New Dictionary(of String, Object);
reqPayload("operationName") = "getPlacesList";
reqPayload("variables") = reqPayload_variables; // reqPayload_variables은 제이슨안에 딕셔너리가 하나 더 있는 형태
reqPayload("query") = "query getPlacesList($input: PlacesInput, $isNmap: Boolean!, $isBounds: Boolean!) {\n businesses: places(input: $input) {\n total\n items {\n id\n name\n normalizedName\n category\n detailCid {\n c0\n c1\n c2\n c3\n __typename\n }\n categoryCodeList\n dbType\n distance\n roadAddress\n address\n fullAddress\n commonAddress\n bookingUrl\n phone\n virtualPhone\n businessHours\n daysOff\n imageUrl\n imageCount\n x\n y\n poiInfo {\n polyline {\n shapeKey {\n id\n name\n version\n __typename\n }\n boundary {\n minX\n minY\n maxX\n maxY\n __typename\n }\n details {\n totalDistance\n arrivalAddress\n departureAddress\n __typename\n }\n __typename\n }\n polygon {\n shapeKey {\n id\n name\n version\n __typename\n }\n boundary {\n minX\n minY\n maxX\n maxY\n __typename\n }\n __typename\n }\n __typename\n }\n subwayId\n markerId @include(if: $isNmap)\n markerLabel @include(if: $isNmap) {\n text\n style\n stylePreset\n __typename\n }\n imageMarker @include(if: $isNmap) {\n marker\n markerSelected\n __typename\n }\n oilPrice @include(if: $isNmap) {\n gasoline\n diesel\n lpg\n __typename\n }\n isPublicGas\n isDelivery\n isTableOrder\n isPreOrder\n isTakeOut\n isCvsDelivery\n hasBooking\n naverBookingCategory\n bookingDisplayName\n bookingBusinessId\n bookingVisitId\n bookingPickupId\n easyOrder {\n easyOrderId\n easyOrderCid\n businessHours {\n weekday {\n start\n end\n __typename\n }\n weekend {\n start\n end\n __typename\n }\n __typename\n }\n __typename\n }\n baemin {\n businessHours {\n deliveryTime {\n start\n end\n __typename\n }\n closeDate {\n start\n end\n __typename\n }\n temporaryCloseDate {\n start\n end\n __typename\n }\n __typename\n }\n __typename\n }\n yogiyo {\n businessHours {\n actualDeliveryTime {\n start\n end\n __typename\n }\n bizHours {\n start\n end\n __typename\n }\n __typename\n }\n __typename\n }\n isPollingStation\n hasNPay\n talktalkUrl\n visitorReviewCount\n visitorReviewScore\n blogCafeReviewCount\n bookingReviewCount\n streetPanorama {\n id\n pan\n tilt\n lat\n lon\n __typename\n }\n naverBookingHubId\n bookingHubUrl\n bookingHubButtonName\n newOpening\n newBusinessHours {\n status\n description\n dayOff\n dayOffDescription\n __typename\n }\n coupon {\n total\n promotions {\n promotionSeq\n couponSeq\n conditionType\n image {\n url\n __typename\n }\n title\n description\n type\n couponUseType\n __typename\n }\n __typename\n }\n __typename\n }\n optionsForMap @include(if: $isBounds) {\n ...OptionsForMap\n displayCorrectAnswer\n correctAnswerPlaceId\n __typename\n }\n queryString\n siteSort\n __typename\n }\n}\n\nfragment OptionsForMap on OptionsForMap {\n maxZoom\n minZoom\n includeMyLocation\n maxIncludePoiCount\n center\n spotId\n keepMapBounds\n __typename\n}\n";
reqJSON = Newtonsoft.Json.JsonConvert.SerializeObject(reqPayload);
newtonsoft.Json / newtonsoft.Json/Linq 네임스페이스를 써야함.
728x90
반응형
'RPA > C#' 카테고리의 다른 글
[C#] 변수 형 변환의 모든 것 (0) | 2022.04.12 |
---|---|
[C#] DATE 함수 사용법에 관한 모든 것(문자열을 DataTime으로 변경 | ) (0) | 2022.04.11 |
[C#] 문자열 사이에 문자 넣기(Insert 활용) (0) | 2022.03.07 |
[C#] 마지막 문자열만 출력(Substring / Left / Right 활용) (0) | 2022.03.07 |