Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions pyfav/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
from pyfav import get_favicon_url
from pyfav import parse_markup_for_favicon
from pyfav import download_favicon
try:
from pyfav import get_favicon_url
from pyfav import parse_markup_for_favicon
from pyfav import download_favicon
except:
from pyfav.pyfav import get_favicon_url
from pyfav.pyfav import parse_markup_for_favicon
from pyfav.pyfav import download_favicon
7 changes: 5 additions & 2 deletions pyfav/pyfav.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@


import urllib, os.path, string
from urlparse import urlparse
try:
from urlparse import urlparse
except:
from urllib.parse import urlparse
import requests
from bs4 import BeautifulSoup

Expand Down Expand Up @@ -189,4 +192,4 @@ def get_favicon_url(url):
return favicon_url

# No favicon in the markup or at url/favicon.ico
return None
return None
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

setup(
name = 'pyfav',
version = '0.1',
version = '0.2',
url = 'http://github.com/phillipsm/pyfav',
author = 'Matthew Phillips',
author_email = 'matt@mattphillips.info',
Expand All @@ -36,4 +36,4 @@
classifiers = filter(None, classifiers.split('\n')),
keywords = ['favicon', 'favicons'],
test_suite = 'test',
)
)