Replace feed referers by feed user agent
This commit is contained in:
parent
3fdbc282c8
commit
31bc67ceba
|
@ -38,7 +38,7 @@ Plugin requirements :
|
||||||
|
|
||||||
Conf values needed :
|
Conf values needed :
|
||||||
feeds
|
feeds
|
||||||
feeds_referers*
|
feeds_agents*
|
||||||
merge_feeds_parsers*
|
merge_feeds_parsers*
|
||||||
|
|
||||||
Output files :
|
Output files :
|
||||||
|
@ -48,6 +48,7 @@ Statistics creation :
|
||||||
remote_addr =>
|
remote_addr =>
|
||||||
feed_parser
|
feed_parser
|
||||||
feed_name_analysed
|
feed_name_analysed
|
||||||
|
feed_parser_last_access (for merged parser)
|
||||||
|
|
||||||
Statistics update :
|
Statistics update :
|
||||||
None
|
None
|
||||||
|
@ -69,7 +70,7 @@ class IWLAPostAnalysisFeeds(IPlugin):
|
||||||
|
|
||||||
def load(self):
|
def load(self):
|
||||||
feeds = self.iwla.getConfValue('feeds', [])
|
feeds = self.iwla.getConfValue('feeds', [])
|
||||||
feeds_referers = self.iwla.getConfValue('feeds_referers', [])
|
feeds_agents = self.iwla.getConfValue('feeds_agents', [])
|
||||||
self.merge_feeds_parsers = self.iwla.getConfValue('merge_feeds_parsers', False)
|
self.merge_feeds_parsers = self.iwla.getConfValue('merge_feeds_parsers', False)
|
||||||
_merge_feeds_parsers_list = self.iwla.getConfValue('merge_feeds_parsers_list', [])
|
_merge_feeds_parsers_list = self.iwla.getConfValue('merge_feeds_parsers_list', [])
|
||||||
|
|
||||||
|
@ -87,9 +88,8 @@ class IWLAPostAnalysisFeeds(IPlugin):
|
||||||
self.user_agents_re.append(re.compile(r'.*atom.*'))
|
self.user_agents_re.append(re.compile(r'.*atom.*'))
|
||||||
self.user_agents_re.append(re.compile(r'.*feed.*'))
|
self.user_agents_re.append(re.compile(r'.*feed.*'))
|
||||||
|
|
||||||
self.referers_uri = []
|
for f in feeds_agents:
|
||||||
for f in feeds_referers:
|
self.user_agents_re.append(re.compile(f))
|
||||||
self.referers_uri.append(f)
|
|
||||||
|
|
||||||
self.merge_feeds_parsers_list = []
|
self.merge_feeds_parsers_list = []
|
||||||
for f in _merge_feeds_parsers_list:
|
for f in _merge_feeds_parsers_list:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user