Chocobo1
c075097acd
Allow to run CI checks locally
...
Now the developer is able to run the checks easily and locally (by
following the instructions in nova3/README.md).
PR #23262 .
2025-09-14 22:17:23 +08:00
Chocobo1
94ef038f3a
Improve abstraction of search plugin
...
To make intentions clear and avoid misuse.
Now it should be possible to inherit `Engine` class and create an usable subclass from it.
PR #23232 .
2025-09-07 17:50:39 +08:00
Chocobo1
becfd19e34
Enable full type checking on search engine
...
Now it utilize type stub for PySocks library and all search engine python code are properly
type checked.
Note that a `cast` is required because there isn't enough hints in PySocks to let the type
checker understand that the classes are supposed to be compatible.
PR #23183 .
2025-08-31 22:10:30 +08:00
Chocobo1
50d60b9589
GHA CI: enforce sorted import in Python scripts
...
This main point is to normalize the sorting of imports in Python scripts.
Currently the default setting from isort is used: https://pycqa.github.io/isort/docs/configuration/custom_sections_and_ordering.html
PR #22793 .
2025-05-31 18:01:02 +08:00
Chocobo1
250fef4ee7
Improve error messages
...
Print error message to stderr instead of stdout.
PR #22581 .
2025-04-20 16:54:49 +08:00
Chocobo1
8fc5d0914d
Add versioning to socks.py
...
Also mark variable as private in novaprinter.py.
PR #22578 .
2025-04-20 16:47:45 +08:00
Chocobo1
2aee875642
Enforce SOCKS proxy setting in search engine plugins
...
Previously it require each plugin to import helpers.py to setup SOCKS proxy.
Now it is enforced by default for all plugins.
Also added a function for plugins to ignore/restore the socket to
default state.
PR #22554 .
2025-04-19 07:11:50 +08:00
Chocobo1
3d73026ff2
Add SOCKS4/SOCKS4a proxy support to search engine
...
Pass 'Perform hostname lookup via proxy' setting along the way.
Also add underline to variables and functions that are private to the python module.
PR #22510 .
2025-04-13 16:25:38 +08:00
FredBill1
795889c417
Migrate socks.py from SocksiPy to PySocks 1.7.1
...
Migrate `socks.py` from SocksiPy 1.01 to [PySocks 1.7.1](c2fa43cbe1/socks.py ), allowing python 3+ compatibility, [details](https://github.com/qbittorrent/qBittorrent/issues/16447#issuecomment-2776894026 ).
The content of the `socks.py` is entirely copied from the [PySocks repository](c2fa43cbe1/socks.py ), the only modification is the license header at the top of the file and trimming trail whitespaces.
Closes #16447 .
PR #22507 .
2025-04-09 17:36:50 +08:00
Chocobo1
4f3d77963f
Add parameter to control whether to unescape HTML entities
...
Some plugin needed the raw data for further processing.
Related: #22074 .
PR #22106 .
2025-01-06 19:05:57 +08:00
Chocobo1
cc31a90931
Provide SSL context field
...
The allows the caller to provide proper SSL parameters and avoid dirty monkey patching to
suppress SSL errors.
2024-12-27 03:53:46 +08:00
Chocobo1
90e457a671
Use built-in method for decoding HTML entities
2024-12-27 03:52:50 +08:00
Chocobo1
871438f557
Bump search engine components version
...
The master branch should have version larger than stable branch.
https://github.com/qbittorrent/qBittorrent/pull/21539/files#r1790078486
PR #21542 .
2024-10-10 16:30:45 +08:00
ducalex
efdc4af448
Search helpers: Add POST support to retrieve_url
...
This allows passing request_data to retrieve_url in order to create a post request.
PR #21184 .
---------
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com >
2024-08-17 13:32:57 +08:00
Chocobo1
69a829dfb0
Clean up search engine
...
Notable changes:
1. Prevent excessive engine module imports.
2. Replace trivial usage of `join()`.
3. Keep the output text sorted whenever possible.
4. Close handles properly.
5. Print error to stderr, not stdout.
6. Report search job exit code.
7. Print exception message to stderr if exception was thrown when
running a search job.
8. Utilize XML library to build XML data
And use 2 spaces as indentation.
PR #21098 .
2024-07-22 16:51:57 +08:00
Chocobo1
ea918da931
Allow numeric types
...
The canonical type for `size_string` is `str`. However numeric types are also accepted in order
to accommodate poorly written plugins.
PR #20976 .
2024-06-23 12:43:35 +08:00
Chocobo1
d71086e400
Add type annotations
...
A few code are revised because the type checker (mypy) doesn't allow
changing types on a variable.
PR #20935 .
2024-06-17 13:18:32 +08:00
BurningMop
dd34c85884
Add optional headers to search request
...
PR #20923 .
2024-06-09 14:03:39 +08:00
Chocobo1
a126a7b493
Adjust user agent version automatically
...
The version calculation is an estimation and it will drift off after some time. Hopefully the
drift offset won't be noticeable within a few years.
Also switched the user agent to Windows 10 which has the largest portion of users to avoid
standing out from the crowd.
PR #20864 .
2024-05-20 13:50:18 +08:00
Vladimir Golovnev
4d8713ce11
WebAPI: Add a way to download .torrent file using search plugin
...
* Simplify nova2dl script
* Use search engine name instead of site URL (like nova2 does)
* Add a way to download torrent using search plugin
PR #20824 .
2024-05-15 08:47:40 +03:00
cayenne17
21a4ab6bac
Update User-Agent
...
PR #20801 .
2024-05-10 21:47:55 +03:00
ducalex
42b87963fd
Add date column to the built-in search engine
...
Adds a date column to the built-in search engine to show when a torrent was published/uploaded on the engine site.
When a plugin wants to show a date, it can now add a `pub_date` entry to its result dict. The value format is a unix timestamp (an integer representing seconds since epoch).
Plugins with no date support will keep working.
PR #20703 .
2024-04-29 21:10:24 +03:00
Chocobo1
b1175b60e1
Use proper comparison for None
...
PR #20762 .
2024-04-29 12:47:27 +08:00
milahu
4ac586c896
Lazy load search plugins
...
PR #20553 .
2024-04-24 22:15:22 +03:00
Chocobo1
47c38e8d91
Apply formatting
2024-03-23 13:55:58 +08:00
Chocobo1
62d96c068a
Remove SGML parser
...
This library is unmaintained, outdated and plugin authors are encouraged to use html.parser
from Python Standard Library instead.
https://docs.python.org/3/library/html.parser.html
PR #19068 .
2023-06-04 12:52:06 +08:00
Chocobo1
4ef8f39f23
Use python isolate mode
...
This (more or less) avoids user's environment variables tampering the
search process.
And also remove usages of `eval()` and `exec()`.
PR #18995 .
2023-05-21 14:04:44 +08:00
luzpaz
4d480b8761
Fix various typos
...
Found via `codespell -q 3 -S *.ts`.
PR #15520 .
2021-10-05 12:58:25 +08:00
Chocobo1
6bfed97710
Add README.md to searchengine folder
2021-01-11 15:11:36 +08:00
FranciscoPombal
41ae2bfb84
Make sure there are no empty files
2020-10-28 14:20:18 +00:00
FranciscoPombal
ef1c7eec74
Fix trailing whitespace in multiple files
...
Also fix formatting of CODING_GUIDELINES.md
2020-10-28 14:20:11 +00:00
Chocobo1
baa13c044a
Drop python2 support
...
Closes #11811 .
2020-02-08 12:36:45 +08:00
Chocobo1
6ac36368cd
Update user agent string
2019-08-09 13:12:11 +08:00
Chocobo1
d52c6230e9
Fix defects found by lgtm.com
2018-11-03 00:34:25 +08:00
Chocobo1
bbe76231cf
Reformat python code to be compliant with PEP8
...
The following command is used:
`pycodestyle --ignore=E265,E722 --max-line-length=100 <py files>`
2018-09-18 12:33:09 +08:00
Chocobo1
26a4703398
Move .qrc files into its own directory
2018-06-11 20:01:33 +08:00
Chocobo1
423511765a
Fix typo
2018-03-14 23:37:08 +08:00
jan.karberg
d534973650
search only when category is supported by plugin Closes #8053
2017-12-17 13:04:37 +01:00
sledgehammer999
7a478424cc
Revert "Drop python2 support.". Closes #7005 .
...
This reverts commit 7d030b4cd9 .
2017-07-06 01:07:09 +03:00
sledgehammer999
7d030b4cd9
Drop python2 support.
2017-06-25 17:20:50 +03:00
sledgehammer999
de74f9298f
Remove all search plugins from repo.
2017-06-15 22:32:39 +03:00
KingLucius
ebc50a7237
remove ExtraTorrent plugin
2017-05-19 16:36:56 +02:00
ngosang
fa64f33c2a
[Search engine] Add btdb plugin
2017-04-21 23:42:07 +02:00
ngosang
5d0cfc7475
[Search engine] Update legittorrents plugin
2017-04-20 21:17:24 +02:00
ngosang
339b35c369
[Search engine] Remove mininova plugin
2017-04-20 21:00:59 +02:00
ngosang
91e7e94820
[Search engine] Update demonoid plugin
2017-04-20 20:56:23 +02:00
ngosang
f0fe8808bd
[Search engine] Update Extratorrent plugin
2017-03-02 21:21:33 +01:00
ngosang
a9c5dab0dd
[Search engine] Update extratorrent plugin. Closes #6261
2017-01-21 19:27:14 +01:00
Yez Ezey
f6dbf2454d
Fix extratorrent searchengine. Closes #5773
...
They changed to magnet link.
2016-11-05 22:31:17 +09:00
ngosang
d249e9e7c6
[Search engine] Remove TorrentReactor plugin
2016-10-11 22:51:54 +02:00