Home > other >  The crawler xpath a web form
The crawler xpath a web form

Time:09-17

Use Google browser xpath helper can match the information, but did not run the following code print out content, want to know why the xpath out content

The from LXML import etree
The from urllib import request

Url="http://www.proxy.com.ru/list_1.html"
The req=request. Urlopen (url). The read (). The decode (" gb2312 ")
The tree=etree. HTML (the req)
For I in a tree. The xpath ("//tbody/tr [position () & gt; 1]/td [3] ") :
Print (i.t ext)

CodePudding user response:

+ + + + + + the same problem

CodePudding user response:

Tbody deleted
  • Related