ash877
|
  |
| Joined: 18 Feb 2008 |
| Total Posts: 5142 |
|
|
| 15 Jul 2015 06:40 PM |
| How does the website I'm using GetAsync on know what to send? Using GetAsync on the website itself will return the entire html layout, bu what if I only want a certain part? |
|
|
| Report Abuse |
|
|
ash877
|
  |
| Joined: 18 Feb 2008 |
| Total Posts: 5142 |
|
|
| 15 Jul 2015 06:57 PM |
| no-one ever answers my questions... |
|
|
| Report Abuse |
|
|
|
| 15 Jul 2015 07:03 PM |
if it returns a JSON format, use JSONDecode, if it doesn't you need to do some string manipulation using methods like
string.match/string.find
etc
-Baheeg |
|
|
| Report Abuse |
|
|
|
| 15 Jul 2015 07:04 PM |
| Basically, you're requesting what's known as a resource from a server. Any page you view on a website was created by someone or something at one point, if you know the address, then you can get all of the HTML for that page, the same exact information your browser uses to display that page to you. If you want only a specific part of that page, you're going to have do what's called scraping. In other words, you're going to have to parse the webpage from the string you get from GetAsync. You don't need any advanced knowledge of HTML to do this, but knowing regex helps for parsing. |
|
|
| Report Abuse |
|
|
ash877
|
  |
| Joined: 18 Feb 2008 |
| Total Posts: 5142 |
|
| |
|
ash877
|
  |
| Joined: 18 Feb 2008 |
| Total Posts: 5142 |
|
|
| 16 Jul 2015 04:46 PM |
| How would I query certain parts such as database from a website that I made? |
|
|
| Report Abuse |
|
|