@Test public void buildRequestWithNullURLWillThrowException() { YoukuExtractor youkuExtractor = new YoukuExtractor(); mExpectedException.expect(IllegalArgumentException.class); youkuExtractor.buildRequest(null); }
@NonNull @Override Request buildRequest(@NonNull String baseUrl) { if (baseUrl == null) throw new IllegalArgumentException(); String ysuid = getYsuid(); Log.d(TAG, "set ysuid: " + ysuid); return new Request.Builder().url(baseUrl) .addHeader("Cookie", "xreferrer=http: .addHeader("Referer", baseUrl) .build(); }
YoukuExtractor extends Extractor { @NonNull @Override Request buildRequest(@NonNull String baseUrl) { if (baseUrl == null) throw new IllegalArgumentException(); String ysuid = getYsuid(); Log.d(TAG, "set ysuid: " + ysuid); return new Request.Builder().url(baseUrl) .addHeader("Cookie", "xreferrer=http: .addHeader("Referer", baseUrl) .build(); } }
YoukuExtractor extends Extractor { @NonNull @Override Request buildRequest(@NonNull String baseUrl) { if (baseUrl == null) throw new IllegalArgumentException(); String ysuid = getYsuid(); Log.d(TAG, "set ysuid: " + ysuid); return new Request.Builder().url(baseUrl) .addHeader("Cookie", "xreferrer=http: .addHeader("Referer", baseUrl) .build(); }  }
YoukuExtractor extends Extractor { @NonNull @Override Request buildRequest(@NonNull String baseUrl) { if (baseUrl == null) throw new IllegalArgumentException(); String ysuid = getYsuid(); Log.d(TAG, "set ysuid: " + ysuid); return new Request.Builder().url(baseUrl) .addHeader("Cookie", "xreferrer=http: .addHeader("Referer", baseUrl) .build(); }   }
YoukuExtractor extends Extractor { @NonNull @Override Request buildRequest(@NonNull String baseUrl) { if (baseUrl == null) throw new IllegalArgumentException(); String ysuid = getYsuid(); Log.d(TAG, "set ysuid: " + ysuid); return new Request.Builder().url(baseUrl) .addHeader("Cookie", "xreferrer=http: .addHeader("Referer", baseUrl) .build(); }   static final String VALID_URL; static final String TEST_URL; }