Skip to content
Advertisement

How can I find email addresses on other sites by entering a domain address?

Using Java, for example, when I search with the domain name “trendyol.com”, can I find domain-related mails on different sites?

http://olaybende.com/acayip/trendyol-corona-virusu-kaynakli-fahis-fiyatlarla-ilgili-aciklama-yapti Mar 5, 2022

http://digitalage.com.tr/trendyoldan-koronavirusle-beraber-artan-fiyatlara-iliskin-aciklama Feb 25, 2022

http://sancaktepenews.com/ihtiyac-belirlendi-stoklar-hazirlandi Feb 20, 2022

http://borsametre.com.tr/trendyoldan-koronavirusle-ilgili-haksiz-fiyat-olusumlarina-yonelik-tedbir-aciklamasi/1191 Jan 26, 2022

http://agriajans.com.tr/ihtiyac-belirlendi-stoklar-hazirlandi-9176.html/ekonomi/47/44/11/13/03/2020/admin Nov 22, 2021

http://agriajans.com.tr/insaf-izan-kalmadi-kendimizi-vuruyoruz-9167.html/ekonomi/43/44/11/13/03/2020/admin Nov 22, 2021

http://haberlerwebte.com/trendyol-15-tllik-makarnalar-icin-aciklama-yapti-4607h.htm Nov 15, 2021

http://teknosafari.net/trendyol-fiyat-artisi-olan-urunlerle-ilgili-islem-yaptigini-acikladi Oct 27, 2021

http://paraajansi.com.tr/trendyol-haksiz-fiyat-olusumuna-karsi-539-urune-islem-yapti/2531 Aug 7, 2020 REMOVED

http://paraajansi.com.tr/trendyoldan-koronavirusle-ilgili-haksiz-fiyat-olusumlarina-yonelik-tedbir-aciklamasi/2291 Aug 7, 2020 REMOVED

Can I output like this?How can I show removed records?

Advertisement

Answer

I solved my problem.You can find out which sites the domain is used on. You can skip the sites you don’t want. By adding database, you can remove it in the next search.

public class FinderDomain {

    public static final String GOOGLE_SEARCH_URL = "https://www.google.com/search";
    private static String Argent = "Mozilla/5.0";

    public static void main(String[] args) throws IOException {

        String searchTerm = "trendyol.com";
        int num = 60; //How many pages do you want

        String searchURL = GOOGLE_SEARCH_URL + "?q='" + searchTerm + "'&num=" + num;
       
        Document doc = Jsoup.connect(searchURL).userAgent(Argent).get();
        Elements results = doc.select("a");
        for (Element result : results) {
            String linkHref = result.attr("href");
            if (linkHref.startsWith("http")) {
                if (!continueValue(linkHref, searchTerm)) {
                    System.out.println(linkHref);
                }

            }
    }

    public static boolean continueValue(String s, String searchTerm) {  
        return s.contains(searchTerm) || s.contains("google.com") || s.contains("facebook.com") || s.contains("instagram.com") || s.contains("twitter.com") || s.contains("linkedin.com") || s.contains("youtube.com") || s.contains("webcache") || s.contains("pinterest.com")
                || s.contains("pinterest.com") || s.contains("translate.google.com")  || s.contains("policies.google.com")
                || s.contains("apkpure.com") || s.contains("www.glassdoor.com") || s.contains("support.google");
    }
}
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement