mirror of
https://github.com/searxng/searxng.git
synced 2025-08-02 18:12:21 +02:00
Flake8 and Twitter corrections
Lots of Flake8 corrections Maybe we should change the rule to allow lines of 120 chars. It seems more usable. Big twitter correction : now it outputs the words in right order...
This commit is contained in:
parent
576fdef440
commit
5d977056f7
13 changed files with 80 additions and 47 deletions
|
@ -60,10 +60,14 @@ def response(resp):
|
|||
|
||||
content = result.xpath('.//div[contains(@class,"red")]//text()')[0]
|
||||
content = content + " - "
|
||||
content = content + html.tostring(result.xpath('.//div[contains(@class,"grey-web")]')[0], method='text')
|
||||
text = result.xpath('.//div[contains(@class,"grey-web")]')[0]
|
||||
content = content + html.tostring(text, method='text')
|
||||
|
||||
if result.xpath(".//span") != []:
|
||||
content = content + " - (" + result.xpath(".//span//text()")[0].strip() + ")"
|
||||
content = content +\
|
||||
" - (" +\
|
||||
result.xpath(".//span//text()")[0].strip() +\
|
||||
")"
|
||||
|
||||
# append result
|
||||
results.append({'url': href,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue