Omnibus commited on
Commit
192d263
1 Parent(s): 448ec0d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -2
app.py CHANGED
@@ -22,13 +22,20 @@ def link_find(url):
22
  q=("a","p","span","content","article")
23
  for p in soup.find_all("a"):
24
  url0=p.get('href')
25
- if not url0.startswith("http"):
 
 
 
 
 
 
 
26
  uri1=url.split("//")[0]
27
  uri2=url.split("//")[1]
28
  uri3=uri2.split("/")[0]
29
  uri=f'{uri1}//{uri3}'
30
  uri=f'{uri}{url0}'
31
- print(uri)
32
  else:
33
  uri=url0
34
  node1['LINKS'].append(uri)
 
22
  q=("a","p","span","content","article")
23
  for p in soup.find_all("a"):
24
  url0=p.get('href')
25
+ if url0.startswith("//"):
26
+ uri1=url.split("//")[0]
27
+ #uri2=url.split("//")[1]
28
+ #uri3=uri2.split("/")[0]
29
+ #uri=f'{uri1}//{uri3}'
30
+ uri=f'{uri}{url0}'
31
+ print(uri)
32
+ if url0.startswith("/"):
33
  uri1=url.split("//")[0]
34
  uri2=url.split("//")[1]
35
  uri3=uri2.split("/")[0]
36
  uri=f'{uri1}//{uri3}'
37
  uri=f'{uri}{url0}'
38
+ print(uri)
39
  else:
40
  uri=url0
41
  node1['LINKS'].append(uri)