-
Notifications
You must be signed in to change notification settings - Fork 1
/
util.py
44 lines (41 loc) · 948 Bytes
/
util.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
def convert(url):
"""Convert url to http:// if not present."""
if not url.startswith('http'):
url = 'http://' + url
return url
def tagList():
"""List of tags to be extracted."""
return [
'description',
'keywords',
'language',
'author',
'publisher',
'revisit-after',
'expires',
'last-modified',
'url',
'content-language',
'content-type',
'content-encoding',
# FACEBOOK
'og:title',
'og:description',
'og:image',
'og:url',
'og:site_name',
'og:type',
# TWITTER
'twitter:card',
'twitter:site',
'twitter:title',
'twitter:description',
'twitter:image',
'twitter:url',
'twitter:creator',
'twitter:site',
'twitter:domain',
# BASIC
'generator',
'application-name',
]