Commit graph

271 commits

Author SHA1 Message Date
Eric Le Lay 7c551ee6aa gpodder escapist_videos doesn't work with escapist magazine v2 2020-07-18 15:13:43 +02:00
Eric Le Lay 12912bed3e fix naive access to response.text
bytes for xml, utf-8 fallback for html, known encoding if available
2020-07-18 15:04:04 +02:00
Eric Le Lay 48d851d292 rework feedcore.Fetcher interface to allow reusing it in custom channel parsers 2020-07-14 18:43:44 +02:00
Eric Le Lay 3babb86c70 use requests package for util.urlopen
now a requests.Response is returned instead of the file-like object from urllib.
Fixed all usages of util.urlopen: it simplifies getting json, text encoding detection.
In particular feedcore (responsible for fetching feeds) is simplified.

This is a first pass and could benefit from better usage of the requests api
(Sessions for instance, to keep connection pools)

TODO: download.py
2020-07-11 17:42:28 +02:00
auouymous e1c49cc0a6 replace channel description with error reason when feed can't be updated 2020-03-31 16:34:09 -06:00
auouymous 15505a3d05 fix incorrectly sorted imports 2020-02-05 00:40:37 -07:00
Eric Le Lay 14c488477a Fix #702 on_podcast_delete method is passed incorrect object
thanks to @auouymous for the fix
2019-11-17 15:45:00 +01:00
Eric Le Lay ba955e27f2 stop feed.get_next_page() loop when no new episode found
see https://gallica.bnf.fr/services/engine/search/opds?
operation=searchRetrieve&version=1.2&exactSearch=false
&query=dewey%20all%20%225%22%20and%20dc.format%20all%20%22epub%22
&filter=provenance%20all%20%22bnf.fr%22
2019-09-10 21:32:15 +02:00
Eric Le Lay dfb245fd85 don't override custom feed descriptions 2019-08-27 21:55:49 +02:00
Eric Le Lay 5e9d2923db Merge remote-tracking branch 'origin/master' into youtube-dl 2019-08-27 20:49:51 +02:00
Hiltronix b49327fe09 YouTube Updates
YouTube full size 900x900 image was  never being selected, images were always 100x100, due to HTMLParser interating till all matches were found.  900x900 was found first, then 100x100px image, which was the final result.  Now all results are saved in a list, the first find is the selected result.

YouTube channel description and link were not being discovered, or saved to the sqlite DB.  Desc is now retreived from the YouTube channel webpage in the same manner as the cover image link, and the link is the YouTube channel URL.
2019-08-19 22:53:34 -05:00
Eric Le Lay a7fbe0d531 use registry.feed_handler instead of gPodderFetcher.custom_handlers 2019-08-17 17:48:52 +02:00
Eric Le Lay a05bd85d76 registry.custom_downloader + registry.download_url
for extensions to be able to register custom downloaders,
not only resolving episode to a real download url.
refactor {escapist,youtube,vimeo}.get_real_download_url to use registry.
2019-08-17 16:25:00 +02:00
Eric Le Lay b4554005d9 fix linter warning 2019-08-11 12:18:28 +02:00
Eric Le Lay d004d952f5 fix #648 Checking for new episodes clears file_size for some downloaded files
in particular youtube episode info never has file size, erasing downloaded file size.
Thanks to @auouymous for the fix
2019-08-11 12:05:30 +02:00
Eric Le Lay 034e3ffa2b Merge default and custom feed handling; support paged feeds
RFC 5005 (http://podlove.org/paged-feeds/)

Fixes #231
2019-06-09 18:59:09 +02:00
Eric Le Lay 42cd004935 don't eat extension's dot in sanitize_filename_ext
it's too confusing: caused bugs in core itself (#630)
2019-06-09 16:05:16 +02:00
Eric Le Lay 0b36f1ee60 pass max_episodes to custom feed handlers 2019-05-19 15:04:17 +02:00
Eric Le Lay 80b3b69837 list instead of generator otherwise episodes not seen are not all deleted 2019-05-19 15:03:17 +02:00
Eric Le Lay 27ac7c2a78 remove code already in podcastparser 0.6.4 2019-05-19 11:38:01 +02:00
Eric Le Lay f454548a5b fix typo in comment 2019-05-19 11:38:01 +02:00
Eric Le Lay 4f063851b1 Custom feeds: change handle_url to fetch_channel 2019-05-18 17:16:06 +02:00
Eric Le Lay 10adc4a0fc add model.unregister_custom_handler
to be able to register AND unregister custom feed handlers from extensions
2019-05-08 19:11:27 +02:00
Eric Le Lay 1b018a3659 Fix #618 download extension lost on long filenames 2019-04-06 17:11:04 +02:00
Eric Le Lay 4400f5bf16 fix #591 invalid local filename when content-disposition invalid extension
1. fix download to remove query string from attachment name
   can cause regressions when filename contains query before extension
   or other strange characters because we parse as url an intended filename
2. fix episode.local_filename() to always sanitize the extension
2019-01-27 12:30:46 +01:00
Eric Le Lay 00fa10b1f6 fix #360 Resume downloads for gpo
partial [--guid] List partially downloaded episodes with or without GUIDs
resume [--guid]  Resume partially downloaded episodes or single GUID
2019-01-26 16:52:05 +01:00
Eric Le Lay 6433f5f10b return filename in episode.local_filename(return_wanted_filename=True)
when episode has a filename. It used to return the full path.
see #555
2018-11-13 21:44:12 +01:00
MarkusHackspacher 4fa86ba0b7 fix linter warning
set linelenght for check to 142
2018-09-15 20:11:18 +02:00
MarkusHackspacher f4c075c334 fix E127 continuation line over-indented for visual indent 2018-08-25 09:42:10 +02:00
Eric Le Lay 49d2d36496 fix #516 - gpodder does not recognize new episodes as new and therefore does not download them
the heuristics to not mark episodes with older dates new was
tricked by a publishedDate in the future
2018-08-17 12:42:18 +02:00
MarkusHackspacher 3ce9cd55e7 remove too many blank lines 2018-07-24 14:11:05 +02:00
MarkusHackspacher 82f41f4c21 sorting imports
with isort -y -rc
see #393
2018-07-24 11:08:10 +02:00
Eric Le Lay 7d6e476435 fix leftover python3 str incompatibility
fixes #482
2018-07-20 16:01:25 +02:00
Eric Le Lay 495ec4bb1f warning at startup if gPodder home path is too long
see #494: we get an error even if we limit folder and filename
if home path is too long.
2018-07-20 09:38:00 +02:00
MarkusHackspacher 7188ef9f2f fix E201 whitespace after '('
Part 2
2018-05-27 20:09:40 +02:00
MarkusHackspacher eecfd64f63 fix E261 at least two spaces before inline comment 2018-05-17 08:39:56 +02:00
MarkusHackspacher 0a851a1302 fix E265 block comment should start with '# ' 2018-05-16 18:17:52 +02:00
MarkusHackspacher 158210c961 fix wrong backslash 2018-05-08 11:08:38 +02:00
MarkusHackspacher 49bb08c8a3 fix E502 the backslash is redundant between brackets 2018-05-08 10:43:56 +02:00
MarkusHackspacher a1e7e1dcbe fix E226 missing whitespace around arithmetic operator 2018-03-27 21:40:36 +02:00
MarkusHackspacher a72a5bbb21 better lines start 2018-03-17 10:27:12 +01:00
MarkusHackspacher 41f07738ff fix W503 line break before binary operator 2018-03-04 20:27:00 +01:00
MarkusHackspacher a90fa0b521 fix W391 blank line at end of file 2018-02-11 21:51:40 +01:00
MarkusHackspacher 0c18a43d13 fix E302 and E303, only blank line change 2018-02-11 00:22:00 +01:00
MarkusHackspacher 955499fcd1 fix E305 expected 2 blank lines after class or function definition 2018-02-10 11:11:20 +01:00
Eric Le Lay 11569ca31d more pycodestyle checks
see #393 for discussion
2018-02-06 15:19:08 +01:00
Thomas Perl 98ec45a712 Update copyright years (2018) 2018-01-28 19:39:53 +01:00
Thomas Perl 7b46a0ee72 Update copyright years (2017) 2017-12-16 13:54:59 +01:00
Adam Voss 2f6ca4fcd9 Merge remote-tracking branch 'origin/master' into gtk3 2017-04-18 10:32:02 -05:00
Adam Voss f456365a14 Properly handle description/html_description until podcastparser is changed 2017-04-18 10:23:24 -05:00