Remove protocol part from URL
This commit is contained in:
parent
39039fd533
commit
1521daf485
1 changed files with 5 additions and 1 deletions
|
@ -61,7 +61,11 @@ def convert_comment(db, site, filename):
|
||||||
if 'site' in d:
|
if 'site' in d:
|
||||||
comment.author_site = d['site']
|
comment.author_site = d['site']
|
||||||
if 'url' in d:
|
if 'url' in d:
|
||||||
comment.url = d['url']
|
logger.info(d['url'][:6])
|
||||||
|
if d['url'][:7] == 'http://':
|
||||||
|
comment.url = d['url'][7:]
|
||||||
|
elif d['url'][:8] == 'https://':
|
||||||
|
comment.url = d['url'][8:]
|
||||||
# else:
|
# else:
|
||||||
# comment.url = d['article']
|
# comment.url = d['article']
|
||||||
if 'date' in d:
|
if 'date' in d:
|
||||||
|
|
Loading…
Add table
Reference in a new issue