If you're interested in maintaining this package please get in touch with me at:
https://github.com/pschmitt/contact/issues/new
Python library to get TV program information from teleloisir
License: GNU General Public License v3.0
If you're interested in maintaining this package please get in touch with me at:
https://github.com/pschmitt/contact/issues/new
Not sure of what is happening here but looks like the url building fails at some points.
Triple checked my DNS, tried to fix the host in my hosts file wihtout success.
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/connector.py", line 955, in _create_direct_connection
traces=traces), loop=self._loop)
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
result = coro.throw(exc)
File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/connector.py", line 825, in _resolve_host
self._resolver.resolve(host, port, family=self._family)
File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/resolver.py", line 30, in resolve
host, port, type=socket.SOCK_STREAM, family=family)
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/lib/python3.5/socket.py", line 733, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_platform.py", line 261, in _async_add_entity
await entity.async_device_update(warning=False)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 377, in async_device_update
await self.async_update()
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/liveboxplaytv/media_player.py", line 98, in async_update
self._client.async_get_current_program()
File "/srv/homeassistant/lib/python3.5/site-packages/liveboxplaytv/liveboxplaytv.py", line 139, in async_get_current_program
return (yield from async_get_cprg(self.channel))
File "/srv/homeassistant/lib/python3.5/site-packages/pyteleloisirs/pyteleloisirs.py", line 240, in async_get_current_program
guide = await async_get_program_guide(chan, no_cache)
File "/srv/homeassistant/lib/python3.5/site-packages/pyteleloisirs/pyteleloisirs.py", line 227, in async_get_program_guide
programs = await asyncio.gather(*tasks)
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/asyncio/tasks.py", line 241, in _step
result = coro.throw(exc)
File "/srv/homeassistant/lib/python3.5/site-packages/pyteleloisirs/pyteleloisirs.py", line 167, in async_set_summary
resp = await session.get(program.get('url'))
File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/client.py", line 476, in _request
timeout=real_timeout
File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/connector.py", line 522, in connect
proto = await self._create_connection(req, traces, timeout)
File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/connector.py", line 854, in _create_connection
req, traces, timeout)
File "/srv/homeassistant/lib/python3.5/site-packages/aiohttp/connector.py", line 959, in _create_direct_connection
raise ClientConnectorError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host www.programme-tv.nethttps:80 ssl:None [Name or service not known]
Bonjour Philipp,
J'utilise indirectement ton module via Home Assistant (home-assistant/core#31503)
Il semblerait que le site ai changé de format et que la balise "h1" que tu cherches ne soit plus présente. cela fait planter l'intégration avec le STB d'orange que j'utilise.
Si tu as un peu de temps est ce que tu peux jeter un oeil ?
Voici la trace dans homeassistant
2020-02-05 22:45:31 ERROR (MainThread) [homeassistant.components.media_player] liveboxplaytv: Error on device update!
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/pyteleloisirs/pyteleloisirs.py", line 155, in extract_program_summary
'div', {'class': 'episode-synopsis'}
AttributeError: 'NoneType' object has no attribute 'find_all'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 299, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 459, in async_device_update
await self.async_update()
File "/usr/src/homeassistant/homeassistant/components/liveboxplaytv/media_player.py", line 116, in async_update
program = await self._client.async_get_current_program()
File "/usr/local/lib/python3.7/site-packages/liveboxplaytv/liveboxplaytv.py", line 142, in async_get_current_program
return (yield from async_get_cprg(self.channel))
File "/usr/local/lib/python3.7/site-packages/pyteleloisirs/pyteleloisirs.py", line 247, in async_get_current_program
guide = await async_get_program_guide(chan, no_cache)
File "/usr/local/lib/python3.7/site-packages/pyteleloisirs/pyteleloisirs.py", line 234, in async_get_program_guide
programs = await asyncio.gather(*tasks)
File "/usr/local/lib/python3.7/site-packages/pyteleloisirs/pyteleloisirs.py", line 171, in async_set_summary
summary = extract_program_summary(text)
File "/usr/local/lib/python3.7/site-packages/pyteleloisirs/pyteleloisirs.py", line 159, in extract_program_summary
soup.find('h1').text.strip())
AttributeError: 'NoneType' object has no attribute 'text'
Merci,
Hello,
Since I have upgraded homeassistant, I have these entries in logs:
Oct 22 14:28:58 xx hass[xx]: 2017-10-22 14:28:58 ERROR (Thread-5) [pyteleloisirs.pyteleloisirs] Could not determine URL for N/A
Oct 22 14:28:58 xx hass[xx]: 2017-10-22 14:28:58 WARNING (Thread-5) [pyteleloisirs.pyteleloisirs] Could not retrieve TV program for N/A
But the idea of pyteleloisirs seems interesting, could you update README so we can use it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.