简体   繁体   中英

Android get result generated from Python

Since I am a starter of Python, I just written some code for grab some text in a long string.
Normally, for the client-server communication, I use PHP as server side language.
After Google Python, I know that in some ways, Python will run faster than PHP for example to get all link in a HTML.
Using PHP, I know that I can using regular expression to extract all links in HTML and generate the results as JSON and get back to Android side using HTTP.
The question is, how can I do it in Python way/?
I really had no experience with python in server. Is it possible to do that?
If yes, please give some hint.

It's not difficult to scrub the links from a page as described in this old answer:

https://stackoverflow.com/a/13465097/514485

Python has a JSON module that makes it easy to format your results in JSON.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM