28 Commits

Author SHA1 Message Date
un-pogaz
730ac72ee8 pep8: fix bare except
ruff 'E722'
2025-07-16 08:55:16 +02:00
un-pogaz
f20aa37527 more string concatenation (extra-edit) 2025-01-24 11:14:25 +01:00
un-pogaz
5f24dfb868 needless else (auto-fix)
ruff 'RUF047'
2025-01-24 11:14:20 +01:00
un-pogaz
dcc86ee4ef explicit f-string conversion (extra-edit) 2025-01-24 11:14:20 +01:00
un-pogaz
b5aca6ff5c uniform string quote (extra-edit) 2025-01-24 11:14:15 +01:00
un-pogaz
37771022ce uniform string quote (auto-fix)
ruff 'Q'
2025-01-24 11:14:14 +01:00
Kovid Goyal
c3595c7b6c
sort imports in all recipe files 2024-03-30 13:03:29 +05:30
Kovid Goyal
535dd78c6f
Remove unused imports 2021-12-16 21:36:03 +05:30
Gerard Ryan
6590bcd76e
Fix Pocket/readitlater recipe
This recipe wasn't working (at least for me), where it would
consistently fail with the following error when trying to download an
article:

```
Traceback (most recent call last):
  File "calibre/utils/threadpool.py", line 100, in run
  File "calibre/web/feeds/news.py", line 1186, in fetch_obfuscated_article
  File "<string>", line 157, in get_obfuscated_article
  File "<string>", line 142, in get_textview
  File "re.py", line 201, in search
TypeError: expected string or bytes-like object
```

I believe this is because Pocket don't allow access to their
"Article View" API by default:
https://getpocket.com/developer/docs/v3/article-view

This change uses the original URL of the article, rather than the
pocket url for it (those `getpocket.com/a/read/<id>` URLs in the
browser seem to just redirect me to `getpocket.com/my-list`). I've a
feeling that the old way might have produced cleaner articles (Pocket
cleanup & then Calibre cleanup), but I've never seen it work
successfully.

We could alternatively try to convince Pocket to enable that API for
the "app" we use here (I think this usage would qualify, as it's a
"Pocket specific feature" (for Calibre)). That might require adopting
their full OAuth flow, rather than using username/password. From
reading their API docs with Calibre in mind, I think that would mean
we'd have to have a web page somewhere that the user would have to
access in their normal web browser, click a button to redirect them to
the Pocket page to authorize the Calibre app to access their Pocket
account, which would then redirect them back to our web page where
we'd instruct them to enter the access token into the "password" field
for the recipe in Calibre.
2021-12-11 22:52:20 +00:00
Kovid Goyal
13961abd16
Also check python files using python 3 flake8 2019-04-13 09:17:31 +05:30
Kovid Goyal
569c576293
py3: port use of urllib in recipes 2019-04-01 13:57:21 +05:30
Kovid Goyal
0fcad5f21f
Fix various uses of iteritems missed by dict_fixes 2019-03-25 15:29:08 +05:30
Kovid Goyal
567040ee1e Perform PEP8 compliance checks on the entire codebase
Some bits of PEP 8 are turned off via setup.cfg
2016-07-29 21:25:17 +05:30
Kovid Goyal
955a83a320 Remove IM from calibre_cover() 2016-05-05 10:05:21 +05:30
Kovid Goyal
da78f784a0 Update Pocket 2015-10-30 08:52:28 +05:30
Kovid Goyal
26deb88793 Update Pocket to use https as http no longer works 2015-08-22 18:04:17 +05:30
Kovid Goyal
7bc70c6221 Update Pocket 2013-12-03 21:02:42 +05:30
Kovid Goyal
55a11e5037 Update Read It Later 2013-05-26 20:40:29 +05:30
Kovid Goyal
83aa842ebb Update Read It Later recipe 2013-04-28 11:42:41 +05:30
Kovid Goyal
eaf9e2adc0 Fix recipes that use get_browser as a classmethod 2013-01-25 18:19:36 +05:30
Kovid Goyal
3626cd219b ... 2012-05-16 09:21:44 +05:30
Kovid Goyal
d8d8ce7e62 ... 2012-05-09 23:50:50 +05:30
Kovid Goyal
e0af0192b7 ... 2012-04-19 20:30:51 +05:30
Kovid Goyal
5c0cd6e070 ... 2012-04-19 10:34:12 +05:30
Kovid Goyal
e67d9a0057 Fix ReadItLater 2012-04-19 09:03:53 +05:30
Kovid Goyal
9c9ed534e3 Improved Read It Later 2012-02-04 10:27:26 +05:30
Kovid Goyal
18860f4970 Fix #862741 (Updated recipe for readitlater) 2011-09-29 15:11:02 -06:00
Kovid Goyal
014d4b50ed Store recipes in the calibre install folder in a zip file 2011-03-19 00:40:36 -06:00