Is it possible to use Python lxml on Google App Engine?

前端 未结 2 1720
孤独总比滥情好
孤独总比滥情好 2021-02-20 03:03

Can I use Python lxml on Google App Engine? (or do I have to use Beautiful Soup?)

I have started using Beautiful Soup but it seems slow. I am just starting to play with

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-20 03:24

    To add to Caio's revised answer, you can use lxml and this is how to do it:

    In your app.yaml file, add the following:

    libraries:
    - name: lxml
      version: "2.3"   # or "latest"
    

    Now import lxml will work in your Python script.

    Here is the link to the official documentation.

提交回复
热议问题