mirror of
https://github.com/LamGC/ContentGrabbingJi.git
synced 2025-07-03 13:57:26 +00:00
[Delete] 删除不再使用的类和方法;
[Update] 优化Javadoc并设置编译注解, 优化代码; [Change] 调整部分日志的输出级别; [Change] RedisPoolCacheStore clear方法将根据返回信息确定是否清空成功; [Change] Dockerfile.sample 调整镜像构建步骤;
This commit is contained in:
@ -1,31 +0,0 @@
|
||||
package net.lamgc.cgj.util;
|
||||
|
||||
import org.apache.http.client.CookieStore;
|
||||
import org.apache.http.impl.client.BasicCookieStore;
|
||||
import org.apache.http.impl.cookie.BasicClientCookie;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class CookieUtil {
|
||||
|
||||
/**
|
||||
* 将{@link java.net.CookieStore}转换到{@link CookieStore}
|
||||
* @param netCookieStore java.net.CookieStore
|
||||
* @return org.apache.http.client.CookieStore
|
||||
*/
|
||||
public static CookieStore NAParse(java.net.CookieStore netCookieStore){
|
||||
CookieStore apacheCookieStore = new BasicCookieStore();
|
||||
netCookieStore.getCookies().forEach(netCookie -> {
|
||||
BasicClientCookie aCookie = new BasicClientCookie(netCookie.getName(), netCookie.getValue());
|
||||
aCookie.setComment(netCookie.getComment());
|
||||
aCookie.setDomain(netCookie.getDomain());
|
||||
aCookie.setExpiryDate(new Date(netCookie.getMaxAge()));
|
||||
aCookie.setPath(netCookie.getPath());
|
||||
aCookie.setSecure(netCookie.getSecure());
|
||||
aCookie.setVersion(netCookie.getVersion());
|
||||
apacheCookieStore.addCookie(aCookie);
|
||||
});
|
||||
return apacheCookieStore;
|
||||
}
|
||||
|
||||
}
|
@ -7,7 +7,7 @@ import net.lamgc.utils.base.runner.StringParameterParser;
|
||||
public class PagesQualityParser implements StringParameterParser<PixivDownload.PageQuality> {
|
||||
|
||||
@Override
|
||||
public PixivDownload.PageQuality parse(String strValue) throws Exception {
|
||||
public PixivDownload.PageQuality parse(String strValue) {
|
||||
return PixivDownload.PageQuality.valueOf(strValue.toUpperCase());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user