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

fix http(s) socks5 nyaa search #548

Merged
merged 16 commits into from
Oct 8, 2023
Merged

fix http(s) socks5 nyaa search #548

merged 16 commits into from
Oct 8, 2023

Conversation

jue0115
Copy link
Contributor

@jue0115 jue0115 commented Oct 8, 2023

1.修复http(s) 带密码验证连接
2.修复socks5不能搜索
3.修复nyaa不能搜索

@vercel
Copy link

vercel bot commented Oct 8, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
auto-bangumi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 8, 2023 11:56am

@@ -21,8 +21,11 @@

class SearchTorrent(RequestContent, RSSAnalyser):
def search_torrents(self, rss_item: RSSItem) -> list[Torrent]:
torrents = self.get_torrents(rss_item.url)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里改的毫无意义,增加了实体内存占用。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

改了才能搜索走socks5

@EstrellaXD EstrellaXD changed the base branch from main to 3.1-dev October 8, 2023 11:07
Comment on lines 5 to 14
if not len(soup.findall("./channel/item/enclosure")):
for item in soup.findall("./channel/item"):
torrent_titles.append(item.find("title").text)
torrent_urls.append(item.find("link").text)
torrent_homepage.append(item.find("guid").text)
else:
for item in soup.findall("./channel/item"):
torrent_titles.append(item.find("title").text)
torrent_urls.append(item.find("enclosure").attrib["url"])
torrent_homepage.append(item.find("link").text)
Copy link
Contributor

@100gle 100gle Oct 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这段代码说实话看着有点冗余,其实在循环的时候是不是只需要对可能会变动的 torrent_urls
torrent_homepage 做条件判断就可以了?

@EstrellaXD EstrellaXD merged commit ab46c92 into EstrellaXD:3.1-dev Oct 8, 2023
1 check passed
@EstrellaXD EstrellaXD mentioned this pull request Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants