{"action":"created","issue":{"url":"https://api.github.com/repos/LinuxCabal/admin-cfdi/issues/34","repository_url":"https://api.github.com/repos/LinuxCabal/admin-cfdi","labels_url":"https://api.github.com/repos/LinuxCabal/admin-cfdi/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/LinuxCabal/admin-cfdi/issues/34/comments","events_url":"https://api.github.com/repos/LinuxCabal/admin-cfdi/issues/34/events","html_url":"https://github.com/LinuxCabal/admin-cfdi/issues/34","id":62272892,"number":34,"title":"Descargar xml mediante peticiones HTTP","user":{"login":"jjlopez","id":418128,"avatar_url":"https://avatars.githubusercontent.com/u/418128?v=3","gravatar_id":"","url":"https://api.github.com/users/jjlopez","html_url":"https://github.com/jjlopez","followers_url":"https://api.github.com/users/jjlopez/followers","following_url":"https://api.github.com/users/jjlopez/following{/other_user}","gists_url":"https://api.github.com/users/jjlopez/gists{/gist_id}","starred_url":"https://api.github.com/users/jjlopez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjlopez/subscriptions","organizations_url":"https://api.github.com/users/jjlopez/orgs","repos_url":"https://api.github.com/users/jjlopez/repos","events_url":"https://api.github.com/users/jjlopez/events{/privacy}","received_events_url":"https://api.github.com/users/jjlopez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/LinuxCabal/admin-cfdi/milestones/2","html_url":"https://github.com/LinuxCabal/admin-cfdi/milestones/Release%200.4","labels_url":"https://api.github.com/repos/LinuxCabal/admin-cfdi/milestones/2/labels","id":1137061,"number":2,"title":"Release 0.4","description":"- Configuración automática o por el usuario para los tiempos de espera.\r\n- Definir un esquema de seccionar la búsqueda para reemplazar la búsqueda por día.\r\n- Reemplazar o poner opcional usar selenium integrando el trabajo de #jjlopez","creator":{"login":"mauriciobaeza","id":636253,"avatar_url":"https://avatars.githubusercontent.com/u/636253?v=3","gravatar_id":"","url":"https://api.github.com/users/mauriciobaeza","html_url":"https://github.com/mauriciobaeza","followers_url":"https://api.github.com/users/mauriciobaeza/followers","following_url":"https://api.github.com/users/mauriciobaeza/following{/other_user}","gists_url":"https://api.github.com/users/mauriciobaeza/gists{/gist_id}","starred_url":"https://api.github.com/users/mauriciobaeza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mauriciobaeza/subscriptions","organizations_url":"https://api.github.com/users/mauriciobaeza/orgs","repos_url":"https://api.github.com/users/mauriciobaeza/repos","events_url":"https://api.github.com/users/mauriciobaeza/events{/privacy}","received_events_url":"https://api.github.com/users/mauriciobaeza/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2015-05-27T23:44:02Z","updated_at":"2016-02-15T03:28:46Z","due_on":null,"closed_at":null},"comments":11,"created_at":"2015-03-17T03:25:02Z","updated_at":"2016-02-17T21:23:51Z","closed_at":null,"body":"Hola a todos.\r\n\r\nDesde hace un par de semanas he estado trabajando en una librería para descargar los xml del servicio del SAT mediante peticiones HTTP utilizando Requests(http://docs.python-requests.org/en/latest/), pensando en que se pueda integrar a admin-cfdi esta nueva funcionalidad. \r\n\r\nEl estado actual del desarrollo es que ya se puede realizar la descarga de los CFDI filtrando por fecha.\r\n\r\nLa dirección del repositorio es la siguiente:\r\nhttps://github.com/jjlopez/descargar-cfdi\r\n\r\nCualquier sugerencia es bienvenida.\r\n\r\n¡Saludos a todos!"},"comment":{"url":"https://api.github.com/repos/LinuxCabal/admin-cfdi/issues/comments/185411110","html_url":"https://github.com/LinuxCabal/admin-cfdi/issues/34#issuecomment-185411110","issue_url":"https://api.github.com/repos/LinuxCabal/admin-cfdi/issues/34","id":185411110,"user":{"login":"ppaez","id":692448,"avatar_url":"https://avatars.githubusercontent.com/u/692448?v=3","gravatar_id":"","url":"https://api.github.com/users/ppaez","html_url":"https://github.com/ppaez","followers_url":"https://api.github.com/users/ppaez/followers","following_url":"https://api.github.com/users/ppaez/following{/other_user}","gists_url":"https://api.github.com/users/ppaez/gists{/gist_id}","starred_url":"https://api.github.com/users/ppaez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppaez/subscriptions","organizations_url":"https://api.github.com/users/ppaez/orgs","repos_url":"https://api.github.com/users/ppaez/repos","events_url":"https://api.github.com/users/ppaez/events{/privacy}","received_events_url":"https://api.github.com/users/ppaez/received_events","type":"User","site_admin":false},"created_at":"2016-02-17T21:23:51Z","updated_at":"2016-02-17T21:23:51Z","body":"@jjlopez Hola Jonathan, en la interfaz gráfica de admin-cfdi tenemos un renglón de status, en donde aparecen los pasos en los que va la descarga, also similar a esto:\r\n```\r\n   Conectando...\r\n   Conectado...\r\n   Buscando...\r\n   Factura 1 de 13\r\n   Factura 2 de 13\r\n   Factura 3 de 13\r\n   Factura 4 de 13\r\n   Factura 5 de 13\r\n   Factura 6 de 13\r\n   Factura 7 de 13\r\n   Factura 8 de 13\r\n   Factura 9 de 13\r\n   Factura 10 de 13\r\n   Factura 11 de 13\r\n   Factura 12 de 13\r\n   Factura 13 de 13\r\n   Desconectando...\r\n   Desconectado..\r\n````\r\nEn  admincfdi/pyutil.DescargaSat que usa Firefox/Selenium, definimos un callback, el cual es llamado en cada paso general donde se da un status, y un segundo callback que es específico para una barra de progreso durante el ciclo de descarga de cada factura:\r\n\r\nhttps://github.com/LinuxCabal/admin-cfdi/blob/master/admincfdi/pyutil.py#L1734\r\n\r\nCon estos callbacks se actualizan la línea de status y la barra de progreso en la interfaz gráfica.\r\n\r\nEn la biblioteca estándar de Python , el módulo ftplib usa este mecanismo en algunas de las funciones que pueden tardar, para poder indicar a la aplicación el progreso.  Su uso es opcional en casi todas las funciones que lo tienen:\r\n\r\nhttps://docs.python.org/3/library/ftplib.html#ftplib.FTP.retrbinary\r\n\r\n¿Cómo te parecería el agregar estos dos callbacks de status y progreso a tu módulo?   Igual si tienes otras sugerencias de cómo podríamos hacerle, estaría bien comentarlas aquí."}}