File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
app/src/main/java/name/caiyao/microreader/ui/adapter Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ public void onCompleted() {
136
136
@ Override
137
137
public void onError (Throwable e ) {
138
138
if (progressDialog .isShowing ()) {
139
+ e .printStackTrace ();
139
140
progressDialog .dismiss ();
140
141
Toast .makeText (mContext , "视频解析失败!" , Toast .LENGTH_SHORT ).show ();
141
142
mContext .startActivity (new Intent (Intent .ACTION_VIEW , Uri .parse (weiboVideoBlog .getBlog ().getPageInfo ().getVideoUrl ())));
@@ -149,7 +150,7 @@ public void onNext(ResponseBody responseBody) {
149
150
progressDialog .dismiss ();
150
151
try {
151
152
String shareUrl ;
152
- Pattern pattern = Pattern .compile ("href \\ s*= \\ s*(?: \" ([^ \" ]*) \" |'([^']*)'|([^ \" '> \\ s]+)).*target= \" blank \" >http " );
153
+ Pattern pattern = Pattern .compile (".*?target= \" _blank \" >(.*?)</a>.*? " );
153
154
final Matcher matcher = pattern .matcher (responseBody .string ());
154
155
shareUrl = weiboVideoBlog .getBlog ().getPageInfo ().getVideoUrl ();
155
156
if (TextUtils .isEmpty (shareUrl )) {
You can’t perform that action at this time.
0 commit comments