A
A
Anton @ Lyalin2017-03-05 09:15:23
Java
Anton @ Lyalin, 2017-03-05 09:15:23

How to parse multiple sites?

The task is to extract some text corresponding to a specific request from various sites. For example, there are websites dictionaries, explanatory dictionaries. Further extraction of the term of a certain word. For individual sites, you can do, that is, search for certain tags, but the same code will not work for different sites. How to make the same code parse different sites at a more or less normal level?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Ne-Lexa, 2017-03-05
@NeLexa

In Java, I recommend Jsoup for parsing .
Installation via maven:

<dependency>
  <!-- jsoup HTML parser library @ http://jsoup.org/ -->
  <groupId>org.jsoup</groupId>
  <artifactId>jsoup</artifactId>
  <version>1.10.2</version>
</dependency>

or gradle:
Become Google search :)

B
bychok300, 2017-03-05
@bychok300

The same code will not parse different sites in the same way, since you are parsing by html tags or xml markup, it doesn’t matter, the important thing is that you are tied to specific object names, and they are different on different sites
. And you can use Jsoup for parsing!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question