Java 有两个问题: 我想从该站点获取所有页面,例如

Java 有两个问题: 我想从该站点获取所有页面,例如,java,android,parsing,jsoup,Java,Android,Parsing,Jsoup,等等 我怎样才能做到这一点 在某些应用程序中,数据是在列表视图中向下滚动时提取的。这是怎么做到的?我的代码对网站上的所有内容都感兴趣,然后显示出来。如何从网站中逐个获取元素 只要构建新的url字符串,并在需要加载时调用它即可 private static String BASE_URL="https://muslimmemo.com/page/"; private final int no_of_pages=10; //inside your doInBackground method fo

等等

我怎样才能做到这一点

  • 在某些应用程序中,数据是在列表视图中向下滚动时提取的。这是怎么做到的?我的代码对网站上的所有内容都感兴趣,然后显示出来。如何从网站中逐个获取元素

只要构建新的url字符串,并在需要加载时调用它即可

private static String BASE_URL="https://muslimmemo.com/page/";
private final int no_of_pages=10;

//inside your doInBackground method
for(int i=1;i<=no_of_pages;i++){
   String new_url=BASE_URL+i+"/";
    Document document = Jsoup.connect(new_url).get();
    //rest of the logic and you have to change some code too and store this data inside LinkedList so you don't lost previous data
}
private静态字符串BASE\u URL=”https://muslimmemo.com/page/";
私人最终整版页数=10页;
//在您的doInBackground方法中

对于(int i=1;i)如何逐个获取内容?您在谈论什么内容,标题和文本位,还是单个文章中的内容?
private static String BASE_URL="https://muslimmemo.com/page/";
private final int no_of_pages=10;

//inside your doInBackground method
for(int i=1;i<=no_of_pages;i++){
   String new_url=BASE_URL+i+"/";
    Document document = Jsoup.connect(new_url).get();
    //rest of the logic and you have to change some code too and store this data inside LinkedList so you don't lost previous data
}