Fix bad translation in code
This commit is contained in:
@ -85,7 +85,7 @@ class TVGuideScraper:
|
|||||||
movies = []
|
movies = []
|
||||||
for channel in html.select('.bloc_cnt'):
|
for channel in html.select('.bloc_cnt'):
|
||||||
if len(channel.select('em')):
|
if len(channel.select('em')):
|
||||||
for movietag in channel.find_all(TVGuideScraper._tag_is_film):
|
for movietag in channel.find_all(TVGuideScraper._tag_is_movie):
|
||||||
movie = Movie()
|
movie = Movie()
|
||||||
movie.title = \
|
movie.title = \
|
||||||
movietag.select('.texte_titre a')[0]['title']
|
movietag.select('.texte_titre a')[0]['title']
|
||||||
@ -113,9 +113,9 @@ class TVGuideScraper:
|
|||||||
return movies
|
return movies
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _tag_is_film(tag):
|
def _tag_is_movie(tag):
|
||||||
"""
|
"""
|
||||||
Helper to check if a tag is a film
|
Helper to check if a tag is a movie
|
||||||
"""
|
"""
|
||||||
return (
|
return (
|
||||||
tag.has_attr('data-nature')
|
tag.has_attr('data-nature')
|
||||||
@ -154,7 +154,7 @@ class FreeboxMoviePlanner:
|
|||||||
)
|
)
|
||||||
self.getListOfAvailableChannels(excluded_channels)
|
self.getListOfAvailableChannels(excluded_channels)
|
||||||
self.excludeUnavailableChannels()
|
self.excludeUnavailableChannels()
|
||||||
self.excludeTelevisionFilm()
|
self.excludeTelevisionMovie()
|
||||||
self.findMoviesOnTMDB()
|
self.findMoviesOnTMDB()
|
||||||
self.excludeBadRatings()
|
self.excludeBadRatings()
|
||||||
for directory in self.excluded_directory:
|
for directory in self.excluded_directory:
|
||||||
@ -166,7 +166,7 @@ class FreeboxMoviePlanner:
|
|||||||
|
|
||||||
def createAuthenticationToken(self):
|
def createAuthenticationToken(self):
|
||||||
logging.info('Creating authentication token')
|
logging.info('Creating authentication token')
|
||||||
self.freebox = Fbx(nomdns=True)
|
self.freebox = Fbx()
|
||||||
hostname = socket.gethostname()
|
hostname = socket.gethostname()
|
||||||
print("You don't seem to have an authentication token.")
|
print("You don't seem to have an authentication token.")
|
||||||
print("I will now atempt to create one.")
|
print("I will now atempt to create one.")
|
||||||
@ -270,8 +270,8 @@ class FreeboxMoviePlanner:
|
|||||||
self.movies = [m for m in self.movies if m.channel in self.channels]
|
self.movies = [m for m in self.movies if m.channel in self.channels]
|
||||||
logging.debug('Kept {}'.format(self.movies))
|
logging.debug('Kept {}'.format(self.movies))
|
||||||
|
|
||||||
def excludeTelevisionFilm(self):
|
def excludeTelevisionMovie(self):
|
||||||
logging.info('Dropping television films')
|
logging.info('Dropping television movies')
|
||||||
self.movies = [
|
self.movies = [
|
||||||
m for m in self.movies if not m.genre.startswith("Téléfilm")
|
m for m in self.movies if not m.genre.startswith("Téléfilm")
|
||||||
]
|
]
|
||||||
@ -312,7 +312,8 @@ class FreeboxMoviePlanner:
|
|||||||
"!Warning!\n"
|
"!Warning!\n"
|
||||||
"!!!!!!!!!\n"
|
"!!!!!!!!!\n"
|
||||||
"Conflicting records detected, please "
|
"Conflicting records detected, please "
|
||||||
"check your Freebox interface"
|
"check your Freebox interface\n"
|
||||||
|
"http://192.168.1.254/#Fbx.os.app.pvr.app"
|
||||||
)
|
)
|
||||||
logging.info("Conflicting records detected '{}'".format(
|
logging.info("Conflicting records detected '{}'".format(
|
||||||
conflicting_movies
|
conflicting_movies
|
||||||
|
Reference in New Issue
Block a user