Commit Graph

146 Commits

Author SHA1 Message Date
auouymous 42d4cbd87c #711 [youtube] support player_response.streamingData.formats
and player_response.streamingData.adaptiveFormats
2020-01-04 12:26:28 +01:00
Eric Le Lay ded38eda51 youtube description: fix log + translate No description available 2019-08-27 21:56:13 +02:00
Eric Le Lay 5e9d2923db Merge remote-tracking branch 'origin/master' into youtube-dl 2019-08-27 20:49:51 +02:00
Hiltronix da3e2391f7 Update youtube.py
Fix white space.
2019-08-19 23:06:52 -05:00
Hiltronix 3b56118daf Update youtube.py
Fix blank line spacing.
2019-08-19 23:03:24 -05: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 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
auouymous deebcf8cec Use https to download from YouTube 2019-05-25 15:33:09 +02:00
Eric Le Lay 06e35d1c5a fix #623: youtube - Download failed: 'reason'
thanks to @auouymous for the patch!
2019-05-18 18:00:04 +02:00
MarkusHackspacher 82f41f4c21 sorting imports
with isort -y -rc
see #393
2018-07-24 11:08:10 +02:00
MarkusHackspacher 9c2faec85a fix E241 multiple spaces after ':' 2018-05-27 20:29:39 +02:00
Eric Le Lay c502e67397 fix parse_youtube_url(None) exception
urlsplit returns empty byte(s) instead of empty str(s)
2018-05-24 21:54:38 +02:00
Eric Le Lay 368a20e5df
Merge pull request #437 from XIncognito10/add_youtube_parsing
Implements #384: Youtube Feeds without API
2018-04-29 11:48:08 +02:00
Xincognito10 5cc67c2289 Fixed Exception statement in youtube.py 2018-04-22 08:21:24 -05:00
Xincognito10 31c479b872 Overhauled get_real_cover to use new api-less youtube feeds
* Final tests complete
2018-04-16 05:14:02 -05:00
Xincognito10 7de1ff1719 * Cleaned up import statements
* Fixed get_real_cover to work with the new api-less youtube fetching
    * get_real_cover now uses the channel id fetched from the feed
    * The regex has been replaced with a dedicated html parser
2018-04-16 05:10:14 -05:00
Xincognito10 a245518dbc Implemented api-less youtube feed parsing (final commit)
* Phased out the resolve_v3_url which has been replaced by
parse_youtube_url

* Updated parse_youtube_url to use logging system
2018-04-10 03:04:50 -05:00
Xincognito10 c6b6ae7eda Implemented api-less youtube feed parsing (final commit)
* Phased out the resolve_v3_url which has been replaced by
parse_youtube_url

* Updated parse_youtube_url to use logging system
2018-04-10 03:00:28 -05:00
Xincognito10 14315c6c72 Implemented api-less youtube feeds
users, playlists and channels are supported
2018-04-08 16:08:05 -05:00
MarkusHackspacher 710d8735d4 fix E221 multiple spaces before operator 2018-03-18 00:47:54 +01:00
MarkusHackspacher 5f7af2d099 fix E262 inline comment should start with '# ' 2018-02-17 10:14:48 +01:00
MarkusHackspacher 0c18a43d13 fix E302 and E303, only blank line change 2018-02-11 00:22:00 +01:00
MarkusHackspacher 9dca8e0506 fix E306 expected 1 blank line before a nested definition 2018-02-06 18:33:52 +01:00
Thomas Perl 98ec45a712 Update copyright years (2018) 2018-01-28 19:39:53 +01:00
Eric Le Lay c937184987 youtube get_real_download_url: fix exception with bytes
req.read() returns bytes instead of string
2018-01-01 15:58:42 +01:00
Eric Le Lay b7733877dd youtube: predefined rss feed if possible (fix #371)
not all youtube channels have an RSS link, so bypass autodiscovery
by directly getting the feed url
2018-01-01 15:57:25 +01:00
Thomas Perl 7b46a0ee72 Update copyright years (2017) 2017-12-16 13:54:59 +01:00
Thomas Perl 0122e8cc00 Merge branch 'master' into gtk3 2016-12-18 13:12:04 +01:00
Eric Le Lay fd0f9c2403 remove pre-python 2.6 compat code 2016-11-26 16:05:17 +01:00
Eric Le Lay 592146cd76 urlopen().read() must be converted to string
when it's searched by re, etc.
FIXME: still work to do to validate some uses are ok
2016-11-26 15:28:15 +01:00
Thomas Perl 5a7c30b359 Port to Python 3 2016-11-21 23:13:46 +01:00
Hiltronix b76aab04d4 YouTube Show Image Sometimes Low-Res
The link being parsed for the YouTube cover art image is sometimes only 100x100px, it appears to be inconsistent from show to show, sometimes 100x100, and sometimes 900x900px.  There is a link in the channel page source that appears to always have a 900x900px image.

This change looks for the "new" link first, to grab the higher quality image.  If not found it falls back to the original link.

Here are two examples of YouTube channels showing the links to the two different sized images:

The Ben Heck Show
https://www.youtube.com/user/thebenheckshow

Element 14
https://www.youtube.com/user/element14
2016-11-20 11:55:53 -06:00
Thomas Perl 28075c09dd Remove QML UI 2016-02-03 19:54:33 +01:00
Thomas Perl 36eefc8a30 Update copyright years (2016) 2016-01-15 15:22:52 +01:00
Danilo Shiga f44590e43f Adding another pattern for youtube feed url list 2015-11-28 12:34:33 -02:00
Thomas Perl c71391552a youtube: Fix cover art downloading (bug 2014) 2015-07-01 22:59:09 +02:00
Thomas Perl aa72634950 Update copyright years (2015) 2015-05-24 19:33:39 +02:00
Thomas Perl ed1ea2d68e QML UI: Add YouTube API key text entry + migrate button 2015-05-20 21:50:10 +02:00
Thomas Perl 4e74b0bf99 YouTube: Auto-resolve URLs also in CLI and QML 2015-05-20 21:19:20 +02:00
Thomas Perl fd1002060c YouTube: Support V3 API via user-supplied key (bug 1999)
This adds auto-discovery of the channel ID and new-style feed for old-style
(username-based) feed URLs when the V3 API key is available, and also adds an
extra menu item for migrating subscriptions.
2015-05-20 21:10:57 +02:00
Thomas Perl 376209ae8a YouTube: Match _ in channel URLs
Thanks to somini for the bug report.
2015-01-18 11:30:28 +01:00
Thomas Perl c022d9e453 Gtk UI: New podcast directory UI 2014-10-22 21:23:06 +02:00
Thomas Perl 312cd86344 YouTube: Add support for channels, rewrite URL matching
Better support for new-style channels, also fix downloading of
cover art for all possible YouTube feed URLs.
2014-09-04 11:21:00 +02:00
Thomas Perl 91a042b1f6 Sailfish: Remove obsolete, Qt4-based Sailfish QML UI
The current Sailfish UI is maintained as part of gPodder 4 in
gpodder-core, gpodder-ui-qml and gpodder-sailfish. The code
removed here was part of the old, Qt4-based Sailfish Alpha
SDK-based port that was still using PySide and Python 2.
2014-06-28 13:48:13 +02:00
Thomas Perl ad6523b74e Merge pull request #115 from pieska/youtube-no-more-extra-signature
signature is in the url itself now, not as an extra parameter any longer
2014-03-01 11:14:23 +01:00
Andreas Piesk a628d07356 signature is in the url itself now, not as an extra parameter any longer 2014-02-28 21:23:08 +01:00
Thomas Perl 553e35f219 Update copyright years (2014) 2014-02-27 21:55:13 +01:00
Andreas Piesk fb5c62e5c9 fix regexp tp prevent failure if map is at the very end 2013-10-26 16:57:30 +02:00
Andreas Piesk 724467a1a7 regexp fails if url_encoded_fmt_stream_map is first argument 2013-10-16 22:18:01 +02:00
Thomas Perl bda982be02 Update copyright years for 2013 2013-03-05 16:38:48 +01:00
Thomas Perl 39daccbd92 QML UI: Initial support for Sailfish Silica 2013-03-01 11:19:18 +01:00
Thomas Perl aa488bccdf YouTube: Fix directory search (bug 1760)
For users who set their realname as display name,
search results resulted in non-working feeds.

Now using the username from the URI to fix this.
2013-01-27 13:24:30 +01:00
Thomas Perl 16ddd925a5 YouTube: Fix downloading on Harmattan 2012-11-23 12:03:41 +01:00
Thomas Perl 811323f5eb YouTube: Remove dependency on OrderedDict
We still need to support Python 2.6 easily, as this is
what we have on MeeGo 1.2 Harmattan.
2012-11-18 21:35:21 +01:00
Thomas Perl 9e218bc3b5 YouTube: Cleanup the format selection patch 2012-10-23 13:41:40 +02:00
Chionsas 14ab2d0478 YouTube: Gtk UI for video quality selection (pull request 19)
1) Redid the youtube video format list (added fallbacks for each quality
setting) and added a new config key youtube.preferred_format_ids, that
accepts a list of supported quality ids.

2) Added a GUI setting switcher that lets a user pick between predefined
video quality settings and respects the 'custom' setting.  'Custom'
should currently only be used if the user prefers 3D formats or 3GP.
All other variants are in the normal settings with sane fallbacks.

Existing users will not feel any change (current fmt=18 default is
respected). Only the default fallback for get_real_download_url() was
changed (to 720p), but that will never be called unless the user clears
her youtube.preferred_fmt_id variable.
2012-10-23 13:41:31 +02:00
Thomas Perl 6733a23f0d YouTube: Add support for https:// links 2012-09-28 16:02:50 +02:00
Andreas Piesk d1d78ed685 YouTube: Fix the new 403 issue (bug 1665) 2012-09-28 16:01:04 +02:00
Thomas Perl 6db58176f6 YouTube: Parse error messages, improve downloading 2012-09-23 20:29:29 +02:00
Thomas Perl 0d605960d9 Fix parse_qs importing for Python < 2.6 2012-09-18 09:53:10 +02:00
Thomas Perl 61f2cfa379 QML UI: Remove remaining Maemo 5 (Fremantle) support
After a year of basically no work towards Maemo 5 support,
I consider gPodder 3-on-Maemo 5 something that we won't ever
do, so the remaining codes goes. This also cleans up some
dead code in the Gtk UI that's been sitting there.

If anybody wants to step up and do something about that, be
my guest. If anything, I'd assume that if anything on the N900,
gPodder 3-on-Nemo Mobilemight be feasible, and in that case, it
should be "just like Harmattan" in most ways.
2012-09-15 20:22:06 +02:00
Thomas Perl abe01deca3 Fix YouTube download URL resolving (bug 1665)
Thanks to Andreas Piesk for the proposed patch and
to all who reported this issue in our bug tracker.
2012-09-15 19:30:02 +02:00
Thomas Perl 9f58b8eda8 Write debug output to logfile (bug 1460)
Also, various clean-ups around the logging mechanism (remove
gpodder.ui.desktop, etc..) needed to make the logging work without
problems.
2012-03-02 09:03:01 +01:00
Thomas Perl 0a6c30afa8 YouTube: Add support for WebM (bug 1336)
If you set your preferred fmt_id of YouTube
to any of the WebM formats (43, 44 or 45),
gPodder will download the WebM-format file.
2012-02-05 15:05:06 +01:00
Thomas Perl 5205a4b71d Update copyright years (add 2012) 2012-01-09 21:19:24 +01:00
Thomas Perl 653e464b59 YouTube: Duration parsing for channel feeds
The duration is parsed out of the description's
HTML content. This might not be the best way to
do it, but it "usually works" ;)
2012-01-09 19:01:45 +01:00
Thomas Perl 2ceba6d99f Support for YouTube playlists 2011-08-05 23:58:55 +02:00
Thomas Perl 05032c0b00 Fix YouTube video downloading 2011-08-04 04:51:49 +02:00
Thomas Perl 8e87300c04 Logging: Deprecate liblogger, use standard logging module 2011-07-15 16:32:06 +02:00
Thomas Perl f8eb799ade Harmattan is here 2011-07-03 18:21:37 +02:00
Thomas Perl 4b6fa1b077 QML UI: Subscription UI and compatibility fixes 2011-06-11 16:35:11 +02:00
Thomas Perl b0f24a0bcb Add episode context menu hook, refactor playback code 2011-06-08 11:04:29 +02:00
Thomas Perl 6da6bae33b YouTube: Use the API URLs for searching users 2011-04-10 23:48:22 +02:00
Thomas Perl 4376057001 Update copyright years 2011-04-01 18:59:53 +02:00
Thomas Perl ced50e47ab Fix YouTube download problems (HTTP 400) (bug 1308) 2011-03-25 18:33:47 +01:00
Thomas Perl 61b3179a1b Remove support for Maemo 4 (Diablo) 2011-02-01 17:59:00 +01:00
Thomas Perl c98ced70dd Fix broken YouTube search (Maemo bug 11756)
Thanks to Stuart Howarth for reporting the bug.
2011-02-01 12:26:20 +01:00
Thomas Perl 18650f2359 YouTube: Use preferred fmt_id in new resolver (bug 1239) 2010-12-18 15:27:10 +01:00
Thomas Perl 8f167f89a0 YouTube: Better error message for protected videos
YouTube protects pages that contain violence, etc.. by
requiring users to login to prove they are over 18. We
can't determine the fmt_url_map in that case, so this
patch adds a better error message to the failed download.
2010-12-18 14:32:33 +01:00
Thomas Perl 7e50609f89 YouTube: Use fmt_url_map for download URLs (bug 1217)
Based on an initial patch by Norbert Lataille.
2010-12-14 18:34:26 +01:00
Thomas Perl c976f85d0d Add widescreen fmt_id=18 YouTube support 2010-09-28 17:55:49 +02:00
Thomas Perl b0a00f3103 YouTube: Fix HD video downloading (bug 1122)
Make sure to strip extraneous backslashes from
the available formats list, so higher fmt_ids
are detected correctly by the YouTube client.
2010-08-23 23:14:35 +02:00
Thomas Perl 756aac8e70 Fix broken YouTube downloading
Something has (again) changed on the web server interface of
YouTube, breaking downloads for older versions of gPodder.
2010-07-24 13:28:06 +02:00
Thomas Perl 5be694f9e4 Fix YouTube video format detection (bug 1076)
YouTube have once again changed their internal
data structures (this time it's "fmt_map"). This
patch fixes these issues by updating the list of
formats known by gPodder and YouTube.
2010-07-18 21:30:32 +02:00
Thomas Perl cf44f7c30e Code cleanup: Remove unused imports 2010-05-17 18:26:13 +02:00
Thomas Perl f963f410bc YouTube streaming for Maemo 5
Enable (lower-quality) YouTube streaming for
Maemo 5, and remove the loading animation in
the Maemo 4 UI for the episode list.
2010-04-03 01:33:12 +02:00
Thomas Perl cf226f4ae9 Fix YouTube format detection (bug 967) 2010-04-01 17:09:42 +02:00
Thomas Perl 55deea0499 Fix YouTube video downloads (t parameter) 2010-04-01 17:05:30 +02:00
Thomas Perl 181564f1b7 Add 2010 to the years in copyright notice
The following command has been used:

grep -r '2005-2009 Thomas Perl and the gPodder Team' * | cut -d: -f1 |
xargs sed -i -e 's/2005-2009 Thomas Perl and the gPodder Team/2005-2010
Thomas Perl and the gPodder Team/g'
2010-01-02 17:35:42 +01:00
Thomas Perl 6ab9856fe9 Configurable preferred YouTube fmt_id (bug 578)
Users can now set their preferred YouTube fmt_id
for downloads of YouTube videos. The default has
been changed to 18, because that's a known-good
video format that should work on most machines.
2009-12-17 13:08:55 +01:00
Thomas Perl dc849c1bec User-agent header for all HTTP requests (bug 626)
This includes shownotes images (from the HTML widget),
OPML downloads, YouTube resolving and my.gpodder.org.
2009-11-14 02:09:21 +01:00
Thomas Perl 6974f777e6 Fix YouTube video downloads for Fremantle 2009-09-19 20:38:09 +02:00
Thomas Perl 1d0eea4465 First cut of Fremantle (Maemo 5) support
Use gpodder.ui.{desktop,diablo,fremantle} for
detecting which environment and interface to use.

Fremantleized versions of the episode selector
and podcast directory windows roughly done.
2009-09-15 19:49:28 +02:00
Thomas Perl 3853d4980b Fix YouTube user cover and video downloading
Added support for fmt_id 22 (HD video!) on Desktop.
Use better quality on Maemo.
2009-09-11 02:07:54 +02:00
Thomas Perl 3464c5d347 Disallow adding non-podcast feeds (bug 554)
Also fixed some YouTube-related problems that
caused the bug and now needed some refactoring.
2009-09-09 19:53:26 +02:00
Thomas Perl 90cda4b56b Rename gpodder.resolver to gpodder.youtube and clean it up
Remove the GTK+ dependency in gpodder.youtube by making the
only function that is in there fake a opml.Importer-like object,
so we can use the model from gpodder.gtkui.opml to display the
results instead of generating the model inside gpodder.youtube.
2009-08-24 17:02:35 +02:00
Renamed from src/gpodder/resolver.py (Browse further)