Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some TPB proxies changed the HTML structure #3318

Merged
merged 5 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## v0.6.1
Released 26 November 2023

Highlights:
* Dependency updates to work with > Python 3.11

The full list of commits can be found [here](https://github.com/rembo10/headphones/compare/v0.6.0...v0.6.1).

## v0.6.0
Released 13 November 2022

Highlights:
* Updated to python 3

The full list of commits can be found [here](https://github.com/rembo10/headphones/compare/v0.5.20...v0.6.0).

## v0.5.20
Released 15 October 2021

Expand Down
4 changes: 3 additions & 1 deletion headphones/searcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -1761,7 +1761,7 @@ def set_proxy(proxy_url):
# Pirate Bay
if headphones.CONFIG.PIRATEBAY:
provider = "The Pirate Bay"
tpb_term = term.replace("!", "").replace("'", " ")
tpb_term = term.replace("!", "").replace("'", " ").replace(" ", "%20")

# Use proxy if specified
if headphones.CONFIG.PIRATEBAY_PROXY_URL:
Expand Down Expand Up @@ -1793,6 +1793,8 @@ def set_proxy(proxy_url):
# Process content
if data:
rows = data.select('table tbody tr')
if not rows:
rows = data.select('table tr')

if not rows:
logger.info("No results found from The Pirate Bay using term: %s" % tpb_term)
Expand Down