import datetime from dateutil.relativedelta import relativedelta import json import requests import sys import warnings from requests.packages.urllib3.exceptions import InsecureRequestWarning warnings.simplefilter('ignore', InsecureRequestWarning) now = datetime.datetime.now() nowDate = now.strftime('%Y-%m-%d') print(nowDate) yesterday = now - relativedelta(days=1) yesterdayDate = yesterday.strftime('%Y-%m-%d') print(yesterdayDate) agoweek = now - relativedelta(weeks=1) agoweekDate = agoweek.strftime('%Y-%m-%d') print(agoweekDate) agomonth = now - relativedelta(months=1) agomonthDate = agomonth.strftime('%Y-%m-%d') print(agomonthDate) result_size = 100 review_term = "검색어" url = "https://api.apptweak.com/ios/applications/package_id/reviews/filter/list.json" params = {"country":"kr","min_rating":1,"max_rating":5,"start_date":agoweekDate2,"end_date":yesterdayDate2,"term":review_term,"from":1,"size":100} headers = { 'X-Apptweak-Key': "token_key", 'cache-control': "no-cache", 'Postman-Token': "token_key" } response = requests.request("GET", url, headers=headers, params=params, verify=False).text print(response) f = open("review_term_and.json", "w") f.write(response) f.close() |
'QA > Test Automation' 카테고리의 다른 글
[Apptweak][Android] 검색어 포함된 리뷰만 추출하기 (0) | 2021.12.06 |
---|---|
[appium][iOS] 특정 Element를 찾기 (0) | 2021.05.26 |
[Appium][selenium] 엘리먼트 찾을 때 명시적 대기(Explicitly Wait) 주기 (0) | 2021.05.06 |
[Appium][Python] 텍스트에 특정 텍스트 있는지 확인하는 코드 (0) | 2021.05.03 |
[Appium_iOS] How to Find Element (0) | 2021.04.27 |
댓글