Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Android
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
Java Persistence with Spring Data and Hibernate
this week in the
Spring
forum!
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Tim Cooke
Paul Clapham
Liutauras Vilda
Sheriffs:
Junilu Lacar
Rob Spoor
Jeanne Boyarsky
Saloon Keepers:
Stephan van Hulst
Carey Brown
Tim Holloway
Piet Souris
Bartenders:
Forum:
Android
email parser
sergey denisovich
Greenhorn
Posts: 1
posted 7 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I must write a site parser, which extract email links and links from pages. I prefer to use Jsoup.
To extract link i must:
File input = new File("/tmp/input.html"); Document doc = Jsoup.parse(input, "UTF-8", "http://example.com/"); Elements links = doc.select("a[href]"); // a with href String linkHref = link.attr("href"); // "http://example.com/"
But to extract email link, such as :
<p><a href="mailto:ask@htmlbook.ru">Задавайте вопросы по электронной почте</a></p>
If i understand right from
this
It must be something:
Elements emailLinks = doc.select("a[href^=mailto:]"); String emailLinkHref = link.attr("href");
Where did i make a mistake?
Quick! Before anybody notices! Cover it up with this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Jsoup Parsing
get links from website
Code to get HTML table data into a java program
How to apply my custom css rule to a JavaFX Web Browser?
serialization
More...