Omnibus commited on
Commit
d7b570d
1 Parent(s): ec076c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -14,7 +14,8 @@ def search_fn(query):
14
  for link in soup.find_all("a",href=re.compile("(?<=/url\?q=)(htt.*://.*)")):
15
  out = (re.split(":(?=http)",link["href"].replace("/url?q=","").split("&sa",1)[0]))
16
  out = out[0]
17
- print(dict(link.headers).get("x-frame-options"))
 
18
  frame_l=f'<div class="container-mee"><div class="put-on-top"><a target="_blank" href="{out}">{out}</a></div><iframe class="responsive-iframe-mee" src="{out}" frameborder="3"></iframe></div>'
19
 
20
  file.writelines(frame_l)
 
14
  for link in soup.find_all("a",href=re.compile("(?<=/url\?q=)(htt.*://.*)")):
15
  out = (re.split(":(?=http)",link["href"].replace("/url?q=","").split("&sa",1)[0]))
16
  out = out[0]
17
+ rr=requests.get(f"{out}")
18
+ print(dict(rr.headers).get("x-frame-options"))
19
  frame_l=f'<div class="container-mee"><div class="put-on-top"><a target="_blank" href="{out}">{out}</a></div><iframe class="responsive-iframe-mee" src="{out}" frameborder="3"></iframe></div>'
20
 
21
  file.writelines(frame_l)