Skip to content

Commit

Permalink
Started implementing download_manager in inputs/abs.py
Browse files Browse the repository at this point in the history
  • Loading branch information
npalacioescat committed Nov 15, 2024
1 parent 8cd3336 commit d710b8f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 8 additions & 1 deletion pypath/inputs/abs.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
# Website: https://pypath.omnipathdb.org/
#

import download_manager as dm

import pypath.share.curl as curl
import pypath.resources.urls as urls

Expand All @@ -29,7 +31,12 @@ def abs_interactions():

result = []
url = urls.urls['abs']['url']
c = curl.Curl(url, silent = False)

dmanager = dm.DownloadManager(pkg='pypath')
desc, item, downloader, dest = dmanager._download(url, backend='curl', ssl_verifypeer=0, ssl_verifyhost=0)
print(item, dest)
c = item.open()

data = c.result
data = [[x.replace('*', '') for x in xx.split('\t')]
for xx in data.split('\n')]
Expand Down
2 changes: 0 additions & 2 deletions pypath/inputs/adhesome.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ def adhesome_interactions():
dmanager = dm.DownloadManager(pkg='pypath')
desc, item, downloader, dest = dmanager._download(url)

#c = curl.Curl(url, large = True, silent = False)

c = item.open(large=True)

data = csv.DictReader(c.result, delimiter = ',')
Expand Down

0 comments on commit d710b8f

Please sign in to comment.