|
@@ -238,6 +238,7 @@ public class CreateInternalServiceImpl implements ICreateInternalService {
|
|
|
chromeOptions.setAcceptInsecureCerts(true);
|
|
|
WebDriver webDriver = new ChromeDriver(chromeOptions);
|
|
|
try {
|
|
|
+ webDriver.manage().deleteAllCookies();
|
|
|
//获取登录页面
|
|
|
webDriver.get(url);
|
|
|
for (Cookie cookie : webDriver.manage().getCookies()) {
|
|
@@ -342,7 +343,7 @@ public class CreateInternalServiceImpl implements ICreateInternalService {
|
|
|
res = HttpUtils2.httpPostRequest("https://ad.oceanengine.com/overture/campaign/create/", campaignParam, header);
|
|
|
JsonNode node = mapper.readTree(res);
|
|
|
campaignId = node.get("data").get("campaign_id").asText();
|
|
|
- System.out.println(res);
|
|
|
+ System.out.println("创建广告组返回信息" + res);
|
|
|
}
|
|
|
|
|
|
Integer itratorNum = requestJson.getInteger("itratorNum");
|
|
@@ -479,7 +480,7 @@ public class CreateInternalServiceImpl implements ICreateInternalService {
|
|
|
System.out.println(planParam);
|
|
|
String createResult = HttpUtils2.httpPostRequest("https://ad.oceanengine.com/overture/ad/create/", planParam, header);
|
|
|
JSONObject result = JSONObject.parseObject(createResult);
|
|
|
- System.out.println(result.toJSONString());
|
|
|
+ System.out.println("创建广告计划返回信息:" + result.toJSONString());
|
|
|
String status = result.getString("status");
|
|
|
String msg = result.getString("msg");
|
|
|
if (null != status && !"success".equals(status)) {
|
|
@@ -595,7 +596,6 @@ public class CreateInternalServiceImpl implements ICreateInternalService {
|
|
|
JSONArray titleList = new JSONArray();
|
|
|
titleArray.forEach(v -> {
|
|
|
JSONObject getTitleObject = JSONObject.parseObject(JSONObject.toJSONString(v));
|
|
|
- ;
|
|
|
JSONObject titleObject = new JSONObject();
|
|
|
String getTitle = getTitleObject.getString("text");
|
|
|
titleObject.put("title", getTitle);
|
|
@@ -656,8 +656,6 @@ public class CreateInternalServiceImpl implements ICreateInternalService {
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
} finally {
|
|
|
- //获得cookie
|
|
|
- Set<Cookie> coo = webDriver.manage().getCookies();
|
|
|
//清除所有的缓存
|
|
|
webDriver.manage().deleteAllCookies();
|
|
|
webDriver.quit();
|