lua-l archive
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
] [
Date Index
] [
Thread Index
]
Subject
:
Re: how to get specific text from website via androlua
From
: Michal Kottman <michal.kottman@
...
>
Date
: Thu, 20 Apr 2023 11:34:10 +0200
On Thu, Apr 20, 2023, 11:25 Rana Ayaz <
rana.ayaz1@gmail.com
> wrote:
what is web scraping?
What you are trying to do (at least that's my understanding based on your original message):
https://en.wikipedia.org/wiki/Web_scraping
Follow-Ups
:
Re: how to get specific text from website via androlua I am pasting the codes of two functions below some people are using this method to get specific text from website but i could not be understand what's the method used here can anyone guide me properly about it? require "import" --import "android.content.Intent" import "android.net.Uri" --import "com.androlua.*" local url = "https://www.timeanddate.com/weather/pakistan/lahore" -- الرجائ عدم اجرائ اي تغيير بعد هذه النقطة Http.get(url,function(status, data) if status == 200 then io.open("/storage/emulated/0/Download/html_data.txt","w"):write(data):close() local loc = string.match(data, "banner__title>Weather%sin%s(%a+)") local temp = string.match(data, "(%d+)%D+°") local type = string.match(data, "class=mtt%stitle=\"(%a+)%.\"") local t_high = string.match(data, "Forecast:%s(%d+)%s/%s%d+") local t_low = string.match(data, "Forecast:%s%d+%s/%s(%d+)") local wind = string.match(data, "Wind:%s(%d+
,
Rana Ayaz
References
:
how to get specific text from website via androlua
,
Rana Ayaz
Re: how to get specific text from website via androlua
,
GoldenKnightFly
Re: how to get specific text from website via androlua
,
Fidel H Viegas
Re: how to get specific text from website via androlua
,
Rana Ayaz
Prev by Date:
Re: how to get specific text from website via androlua
Next by Date:
Re: how to get specific text from website via androlua I am pasting the codes of two functions below some people are using this method to get specific text from website but i could not be understand what's the method used here can anyone guide me properly about it? require "import" --import "android.content.Intent" import "android.net.Uri" --import "com.androlua.*" local url = "https://www.timeanddate.com/weather/pakistan/lahore" -- الرجائ عدم اجرائ اي تغيير بعد هذه النقطة Http.get(url,function(status, data) if status == 200 then io.open("/storage/emulated/0/Download/html_data.txt","w"):write(data):close() local loc = string.match(data, "banner__title>Weather%sin%s(%a+)") local temp = string.match(data, "(%d+)%D+°") local type = string.match(data, "class=mtt%stitle=\"(%a+)%.\"") local t_high = string.match(data, "Forecast:%s(%d+)%s/%s%d+") local t_low = string.match(data, "Forecast:%s%d+%s/%s(%d+)") local wind = string.match(data, "Wind:%s(%d+
Previous by thread:
Re: how to get specific text from website via androlua
Next by thread:
Re: how to get specific text from website via androlua I am pasting the codes of two functions below some people are using this method to get specific text from website but i could not be understand what's the method used here can anyone guide me properly about it? require "import" --import "android.content.Intent" import "android.net.Uri" --import "com.androlua.*" local url = "https://www.timeanddate.com/weather/pakistan/lahore" -- الرجائ عدم اجرائ اي تغيير بعد هذه النقطة Http.get(url,function(status, data) if status == 200 then io.open("/storage/emulated/0/Download/html_data.txt","w"):write(data):close() local loc = string.match(data, "banner__title>Weather%sin%s(%a+)") local temp = string.match(data, "(%d+)%D+°") local type = string.match(data, "class=mtt%stitle=\"(%a+)%.\"") local t_high = string.match(data, "Forecast:%s(%d+)%s/%s%d+") local t_low = string.match(data, "Forecast:%s%d+%s/%s(%d+)") local wind = string.match(data, "Wind:%s(%d+
Index(es):
Date
Thread