How can I perform web scraping in my Flutter app? - flutter

I have a Flutter app which I want to get the lot size for an input address from Redfin and use the data scraped in the app for a search process. Does anyone have any idea on how to go about this or share any resource that can help?

I believe that you should handle scraping tasks on the server-side. There are great wrappers for redfin in python for example one here. But if you want to handle scraping in flutter you will need http package to load redfin pages and html package to get specific dom elements. There is a good video tutorial by Johannes Milke.

Related

Flutter_How to scrap the data from Javascript in web?

I need to get data from javascript in web-site.
It was successful to get data from general html web by using flutter_webscrapper dart package but looks like the webscrapper do not support to load javascript and scrap it.
I've been searching it and lots of developers recommend to use flutter_webview as headless browser.
However, flutter_webview spends too much time to create browser & load website. It takes almost over 4~5 seconds. Seems that challenge to use it in commercial product.
I also cannot use flutter_puppeteer because it does not support android & ios.
If there are any other way or other Dart package to scrap the data from javascript in web-site, please let me recommend. Waiting for your supports.
You can use web_scraper package .
may be using getAllScripts or getScriptVariables methods help you .
this sample repository used web_scraper package .

Advanced features with Flutter Driver (or Silenium/Ghost Inspector)

Looking for a UI integration test strategy for Flutter. We'd love to use Silenium/Ghost Inspector but seems that is not practical due to lack of html id's or CSS classes in Flutter (Add id or name property or other means of identification for Flutter Web applications?). Or has anyone found a way round that?
In the meantime Flutter Driver has only very basic documentation for simple tests like finding a button and pressing the button. Anyone know if I can do other operations like navigate to a specific page (e.g. using a # url fragment), test a link which leads to an external site, check visual setup of the page against an image, and other such tests which would be standard in Silenium and the like.
Thanks!!
Well seems Flutter Driver is still very limited so I have instead found a strategy for using Selenium, posted full details here:
Strategy to use Selenium browser testing with Flutter Web apps

Swift Read HTML elements on webpage

I am trying to read a specific text on a website, and I was wondering how I would proceed doing so. I am trying to get the followers-count on the instagram website, to then retrieve it in my app and display it. How would I proceed with this?
I have searched both Google and GitHub for parser, with no luck - and there is no tutorial on YouTube explaining how to do this.
Thanks in advance.
Usually for something like this, you'll want to use the official API.
Isolating and reading an element in web page is likely not what you want to do. An API gives you access to parts of a service an application might need to interact with, just like this.

reloading the soundcloud html widget with different sets from links

I was advised to post this here by SoundCloud support - I hope you can help. I want to use the html5 widget on my site and access different sets but, rather than have multiple widgets on a page, I want to be able to reload the widget with a different set by clicking on different links on the page. It seems you can do this using the API and I have been playing with w.soundcloud.com/player/api_playground.html and have got it to load my sets by putting the api.soundclound.com url in the appropriate box and clicking "reload widget".
I really don’t know javascript at all so I was hoping to copy the source from that page and try and edit it to do what I want. However, I can’t even get the page to load when it is hosted on my site:
http://www.indigomusic.co.uk/SCtest/playground.htm
I downloaded api.js and put it in a folder on my server but I’m obviously missing step(s). I’ve read http://developers.soundcloud.com/docs/html5-widget#introduction but it obviously assumes a level of javascript knowledge that I just don’t have...
...are you able to help?
Many thanks,
Dan Selby
You don't have do use the Widget API for that necessarily.
Here is a simple example using jQuery and the SoundCloud SDK doing what you described:
http://dl.dropbox.com/u/12477597/Temporary/dynamic-widget-example.html
Hope it Helps.

Google web toolkits - multiple pages

On the google website there an example of a simple GWT appliatoin, following is a link:
http://code.google.com/webtoolkit/doc/1.6/tutorial/create.html
The above application has a host page:StockWatcher.html
and StockWatcher.java is the entry point.
If I wanted to add more html pages to this application, we keep one single host page and the entry point will add different panels depending on which link the user clicked on? In this case, how to know which link the user clicked on? If I create a navigation panel and each link has a request parameter, then after the user clicks on the link, How to get the request parameter?
Are there any tutorials available online on how to create a fully functional application? The one example google provides is too simple.
Thanks so much in advance
You have two options to have multiple page web application using gwt.
1) Use gwt history feature and listen for the history change. In this approach at the initial page load itself browser downloads all the javascripts(Including the widgets which are not useful in current link). Still this can be avoided by using gwt code splitting.
2) Create multiple modules. In this case you have to create multiple html pages and GWT entry points. For each major functionality create a gwt module and link that with [modulename].html file. In this approach browser downloads only particular feature's javascript. Not all the javascripts.
Based on your application requirement you can pick one of the option. IMHO I would suggesst second option.