java - Jsoup cyrillic letters in links and spaces. How to parse? -


i try parse images links, , there links cirillic letter. filenotfoundexception.

<img src="http://vao-priut.org/sites/default/files/images/ главной!.thumbnail.jpg"> 

and there space. how can solve it?

class parsepage extends asynctask<string,void,string>{ document doc=null; elements names,imgs;  @override protected string doinbackground(string... params) {     try {         input = new url("http://vao-priut.org/category/fotokatalog/sektor");         string link = string.valueof(input);              doc = jsoup.connect(link).get();             names = doc.select("table.col-3 div.views-field-title span.field-content a[href]");             imgs = doc.select("table.col-3 div.views-field-image-image span.field-content img");               (element img : imgs) {                  element myimage = img;                 string imgsrc = myimage.attr("src");                 inputstream inp = new java.net.url(imgsrc).openstream();                 // decode bitmap                 bitmap = bitmapfactory.decodestream(inp);                  allimages.add(bitmap);             }             (element name : names) {                 list.add(name.text());             }        /* progressdialog mdialog = new progressdialog(getactivity());         mdialog.setmessage("please wait...");         mdialog.setcancelable(false);         mdialog.show();*/           }catch(ioexception e){             e.printstacktrace();         }          return text;     }  @override protected void onpostexecute(string result) {     super.onpostexecute(result);     sectoradapter = new sector_adapter(getactivity());     c_grid.setadapter(sectoradapter);     image.setimagebitmap(allimages.get(0));    title.settext(list.get(0));       } 

}

this code.

and there image errors

введите сюда описание изображения image bigger size 1

введите сюда описание изображения image bigger size 2


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -