GrabURL from Website table - android

Hi Guys I Want to Grab an URL from a site the page only has one or many URL link on it, I would like to connect to the site URL and grab the link fro inside the page And put that in a string, Can It be done? I want to do it in android. Excuse me If this is a simple question Is that I really don't know how to do it, I have done researched but I am confused.
I want to grab this page
http://nightlies.videolan.org/build/win64/last/
It's Vlc, There are 6 Links and they are constantly updated, How can I get the urls and put them each on a string on My activity?, I want to fetch the links when the app is loaded so It gets the links as they are changing from day to day.
Thanks

You need an HTML Parser like JSoup: http://jsoup.org/.

Related

Facebook like share in android EditText

Good day.I want to create an share field like facebook.In the facebook if you insert an link it will automatically get the lets say 'short preview' of your link with an title and image.I dont think that facebook got in touch with whole wordls website databses so it gather them from databases but rather parsing the url somehow.Anyway lets imagine i have an edittext with user letting input some ulr.How can i achieve this kind of technique?By googling i did not find anything closer to what i want.
Facebook downloads the url and displays the title in the header and a few lines of text. A prominent image on the page if it finds one. You'd have to do something similar- download the url, parse the html, and grab enough info to make your preview.
Most of the websites have og(Open Graph) tags in them. Check out the Facebook Open Graphs Website to understand more about these tags. You can fetch data corresponding to these tags and that is what most social media sites and WhatsApp do to provide a preview.

Getting wikipedia content page passing its title in Android

I'm developing an Android app that might use Wikipedia API to retrieve the content of a given page (from its title). I searched a lot in the web but I don't find useful information about the implementation. I read the MediaWiki documentation and I tried to format my requests in json format (example: request for "mountain" page content but the text isn't clear and I don't know how manage the request from my Android application.
So, my question is: how can I getting (clear) wikipedia page content by passing the title page from my application? And how to save the well format content in a String (that will corresponds with a TextView in a second moment)?
Anyone knows a good tutorial or can help me with some snippets?
Thank you very much indeed guys! :)
action=parse or action=mobileview or action=query&prop=extracts, depending on what exactly do you need. Use the API sandbox to interactively experiment with various requests, it has usage examples and shows how to build requests properly.

In Andorid, is it possible to get the Embed Html code of a YouTube video link?

I'm little bit struggle on past few days i can't get good solution for regarding this. My task is to load the youtube link in an webview. The given url is VideoLink. I directly load this link through android webview it won't play. When i load the embed code of this link, it successfully loaded. Here my problem is i get the embed code Manually (ie load the url on system browser-> right click -> select copy embed html),but i have lot of links like this. Is it not possible to do manually. Is it possible to get the embed html code of youtube link by programmatically.
Why cant you create a httpConection to the URL and read the InputStream in to String and give it to Webview. if you can explain a bit more, i can suggest you a better idea.

How can I parse webpage content in Android

I have a webpage that I know the contents of (standard look)
I am trying to parse the webpage in my android device so that I can extract certain information (say phone number). I have the URL.
How can I achieve this in Android? Any suggestion to how I can start or a quick example of doing so?
Thank you so much for the help
Try HTMLCleaner or TagSoup, for more information please check this example: http://blog.andrewpearson.org/2010/07/android-html-parsing.html
Also check out this StackOverflow question: What is the fastest way to scrape HTML webpage in Android?

xml parsing with no browser use

I have read the example for Rss Parsing from the ibm site.(http://www.ibm.com/developerworks/opensource/library/x-android/).
In this example,the rss are shown in a listview and then,if you press one announcement you can see it in the web browser of the device.How could i see them in the app,with no use of the device browser?
Thanks a lot
Create a layout with a WebView then load the URL from each "announcement" using WebView.loadUrl.
I'm a little confused but you seem to have answered your own question.
You say you don't want to use the web browser on the device but the example in your question doesn't use the browser. It does exactly what you're asking for.
The idea is that you download the html from the website and then use the parser to break it up into separate "announcements" and store them in list view items in your program.
I have done a bit of this type of thing myself in android. I used jsoup java library, which makes breaking the html into the bits you want to display really easy.
If you want some more help I can give you an example of an app I made that pulls movie times from google.com/movies as an example. here are links to the classes where I did the html download and parse:
ScreenScraper.java
HtmlParser.java

Categories

Resources