pastebin backend: Switch to xpath expressions
This commit is contained in:
parent
92fc86a033
commit
e597ea8844
1 changed files with 4 additions and 3 deletions
|
|
@ -25,9 +25,10 @@ __all__ = ['PastePage']
|
||||||
|
|
||||||
class PastePage(BasePage):
|
class PastePage(BasePage):
|
||||||
def fill_paste(self, paste):
|
def fill_paste(self, paste):
|
||||||
header = self.parser.select(self.document.getroot(), '#content_left div.paste_box_info', 1)
|
header = self.parser.select(self.document.getroot(),
|
||||||
|
'id("content_left")//div[@class="paste_box_info"]', 1, 'xpath')
|
||||||
paste.title = self.parser.select(header, 'div.paste_box_line1 h1', 1).text
|
paste.title = self.parser.select(header,
|
||||||
|
'//div[@class="paste_box_line1"]//h1', 1, 'xpath').text
|
||||||
|
|
||||||
def get_id(self):
|
def get_id(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue