johann22 commited on
Commit
8e093f1
1 Parent(s): 7b712a6

Update i_search.py

Browse files
Files changed (1) hide show
  1. i_search.py +3 -3
i_search.py CHANGED
@@ -1,6 +1,6 @@
1
  import requests
2
  from bs4 import BeautifulSoup
3
-
4
  headers_Get = {
5
  'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0',
6
  'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
@@ -20,8 +20,8 @@ def i_search(url):
20
  out1 = ' '.join([p.text for p in soup.find_all('p')])
21
  out2 = ' '.join([p.text for p in soup.find_all('span')])
22
  #if out == "" or out == None:
23
- #out2 = ' '.join([p.text for p in soup.find_all('article')])
24
- out = f'{out}\n{out1}\n{out2}'
25
 
26
  return out
27
  except Exception as e:
 
1
  import requests
2
  from bs4 import BeautifulSoup
3
+ import lxml
4
  headers_Get = {
5
  'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0',
6
  'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
 
20
  out1 = ' '.join([p.text for p in soup.find_all('p')])
21
  out2 = ' '.join([p.text for p in soup.find_all('span')])
22
  #if out == "" or out == None:
23
+ out3 = ' '.join([p.text for p in soup.find_all('article')])
24
+ out = f'{out}\n{out1}\n{out2}\n{out3}'
25
 
26
  return out
27
  except Exception as e: