Skip to content

Commit

Permalink
fix local port
Browse files Browse the repository at this point in the history
  • Loading branch information
LimeDrive committed May 31, 2024
1 parent 9c851bb commit d3341e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ygg_rss_proxy/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def replace_torrent_links(rss_content):
original_url = enclosure.get('url')
if original_url.startswith(TORRENT_URL):
params = original_url.split('?')[1]
new_url = f"http://{LOCAL_RSS_HOST}:{LOCAL_RSS_HOST}/torrent?{params}"
new_url = f"http://{LOCAL_RSS_HOST}:{LOCAL_RSS_PORT}/torrent?{params}"
enclosure.set('url', new_url)

return etree.tostring(tree, encoding='utf-8', xml_declaration=True)
Expand Down Expand Up @@ -72,7 +72,7 @@ def proxy_rss():

@app.route('/torrent', methods=['GET'])
def proxy_torrent():
torrent_url = request.url.replace(f"http://{LOCAL_RSS_HOST}:{LOCAL_RSS_HOST}/torrent", TORRENT_URL)
torrent_url = request.url.replace(f"http://{LOCAL_RSS_HOST}:{LOCAL_RSS_PORT}/torrent", TORRENT_URL)

if not session.cookies:
cookies = authenticate()
Expand Down

0 comments on commit d3341e6

Please sign in to comment.