[senscritique] Add comments to explain magic code lines
This commit is contained in:
parent
a7e78c1dc9
commit
c097582137
2 changed files with 12 additions and 2 deletions
|
|
@ -58,6 +58,10 @@ class SenscritiqueBackend(BaseBackend, ICapCalendarEvent):
|
||||||
'16': u'Bouygues',
|
'16': u'Bouygues',
|
||||||
}.iteritems())])
|
}.iteritems())])
|
||||||
|
|
||||||
|
"""
|
||||||
|
dict that represents ids list of general-interest channels included in a tv package
|
||||||
|
{'tv package id': ['general-interest channels ids list']}
|
||||||
|
"""
|
||||||
general = {
|
general = {
|
||||||
9: [46, 2, 48, 56],
|
9: [46, 2, 48, 56],
|
||||||
1: [49, 46, 21, 2, 36, 59, 54, 48, 56, 50, 32, 1, 51, 24, 38, 34, 37, 6, 25, 11, 53, 26, 47],
|
1: [49, 46, 21, 2, 36, 59, 54, 48, 56, 50, 32, 1, 51, 24, 38, 34, 37, 6, 25, 11, 53, 26, 47],
|
||||||
|
|
@ -69,6 +73,11 @@ class SenscritiqueBackend(BaseBackend, ICapCalendarEvent):
|
||||||
16: [49, 46, 2, 36, 59, 54, 32, 24, 34, 37, 53, 47],
|
16: [49, 46, 2, 36, 59, 54, 32, 24, 34, 37, 53, 47],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
dict that represents ids list of cinema channels included in a tv package
|
||||||
|
{'tv package id': ['cinema channels ids list']}
|
||||||
|
"""
|
||||||
cinema = {
|
cinema = {
|
||||||
9: [10, 7],
|
9: [10, 7],
|
||||||
1: [10, 7, 9, 8, 52, 19, 18, 17, 16, 20, 15, 14, 4055, 44, 3, 45, 42, 41, 43, 13, 12],
|
1: [10, 7, 9, 8, 52, 19, 18, 17, 16, 20, 15, 14, 4055, 44, 3, 45, 42, 41, 43, 13, 12],
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,9 @@ class SenscritiqueBrowser(BaseBrowser):
|
||||||
'%s://%s/film/(.*?)' % (PROTOCOL, DOMAIN): EventPage,
|
'%s://%s/film/(.*?)' % (PROTOCOL, DOMAIN): EventPage,
|
||||||
}
|
}
|
||||||
|
|
||||||
LIMIT = 25
|
LIMIT = 25 # number of results returned for each ajax call (defined in the website).
|
||||||
LIMIT_NB_PAGES = 10
|
|
||||||
|
LIMIT_NB_PAGES = 10 # arbitrary limit to avoid infinitive loop that can occurs if total number of films is a multiple of LIMIT (in website it causes an infinite scroll)
|
||||||
|
|
||||||
HEADER_AJAX = {"User-Agent": "Mozilla/5.0 (Windows; U; Windows "
|
HEADER_AJAX = {"User-Agent": "Mozilla/5.0 (Windows; U; Windows "
|
||||||
"NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8"
|
"NT 5.1; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue