Skip to content

Commit

Permalink
Merge pull request #4 from joeirimpan/master
Browse files Browse the repository at this point in the history
fix: Python 3 compatability
  • Loading branch information
knadh authored Feb 6, 2019
2 parents c1a44b5 + fdafacf commit 724fbf1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions rbiparser/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@
import re
import csv
import json
import urlparse
import os
import glob
import string

try:
from urlparse import urlparse
except ImportError:
from urllib.parse import urlparse

import requests
from bs4 import BeautifulSoup as soup
import xlrd
Expand Down Expand Up @@ -113,7 +117,7 @@ def convert_xls_to_csv(src, target, headers):

def url_to_file(url):
"""Exctract the potential filename from a file url."""
return urlparse.urlparse(url).path.split("/")[-1]
return urlparse(url).path.split("/")[-1]


def load_etags(fname):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
"Topic :: Database",
"Topic :: Software Development :: Libraries"
],
install_requires=["requests", "xlrd", "beautifulsoup4", "click"]
install_requires=["requests", "xlrd", "beautifulsoup4", "click", "lxml"]
)

0 comments on commit 724fbf1

Please sign in to comment.