Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- protected Document doInBackground(String... urls) {
- try {
- return Jsoup.connect(urls[0]).get();
- } catch (IOException e) {
- e.printStackTrace();
- return null;
- }
- }
- @Override
- protected void onPostExecute(Document document) {
- if (document != null) {
- Elements imgElements = document.select("img");
- List<String> images = new ArrayList<>();
- for (Element element : imgElements) {
- String image = element.attr("data-src");
- Log.d("IMAGE_URL", image);
- images.add(image);
- }
- }
- }
Add Comment
Please, Sign In to add comment