Code Monkey home page Code Monkey logo

pyteleloisirs's Introduction

pyteleloisirs's People

Contributors

bnounours avatar dependabot[bot] avatar jffz avatar pschmitt avatar vincent-k avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pyteleloisirs's Issues

URL building issue

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]

Erreur lors de la récupération du programme TV

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,

[pyteleloisirs.pyteleloisirs] Could not determine URL for N/A /

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.