lr1 -> task_1 -> e3-e8

This commit is contained in:
2026-04-05 20:39:21 +05:00
parent a2b7572206
commit 500c41df80
7 changed files with 214 additions and 0 deletions

24
lr10/task_1/e5.java Normal file
View File

@@ -0,0 +1,24 @@
package lr10.task_1;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import java.io.IOException;
public class e5 {
public static void main(String[] args) {
String url = "https://itlearn.ru/first-steps";
try {
Document doc = Jsoup.connect(url).get();
Elements links = doc.select("a[href]");
for (Element link : links) {
System.out.println(link.attr("abs:href"));
}
} catch (IOException e) {
e.printStackTrace();
}
}
}