简体   繁体   English

如何在Play框架中结合python脚本设计价格检查webapp?

[英]how to design a price checking webapp in play framework combine with python scripting?

My goal is 

To let user enter a shopping site link in my webapp, For example, amazon.com/items/123, and then according to the price I crawled from the amazon.com for this item 123, then I (do some logic stuffs) generate a competitive price for this item and display in my webapp. 要让用户在我的Web应用程序中输入购物网站链接(例如amazon.com/items/123),然后根据我从amazon.com抓取的该商品123的价格,然后(进行一些逻辑处理)生成具有竞争力的价格,并显示在我的网络应用中。

What I have is :

The python script can goto the amazon.com/items/[input] , and then crawl the price ,item , etc details, python脚本可以转到amazon.com/items/[input],然后抓取price,item等详细信息,

The simple user interface that allow user to enter a link with a controller doing nothing.. 简单的用户界面,允许用户输入与控制器无关的链接。

What I dont know is 

how to combine the user interface in play-framework and the python script? 如何在播放框架和python脚本中结合用户界面? Or is there any better approach to solve this problem? 还是有解决这个问题的更好方法?

The question is not related to Play Framework. 该问题与Play框架无关。

There are ways to run Python from Java: Java Python Integration . 有几种方法可以从Java运行Python: Java Python Integration But that would be a mess to maintain. 但这将是一团糟。

Your parser does not seem to be a complicated one. 您的解析器似乎并不复杂。 I would rewrite in on Java. 我会用Java重写。 Plat itself provides a nice WS library for asynchronous HTTP calls: http://www.playframework.com/documentation/2.1-RC2/JavaWS Plat本身为异步HTTP调用提供了一个不错的WS库: http : //www.playframework.com/documentation/2.1-RC2/JavaWS

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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