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

Merge Fixes for crawler into master #278

Merged
merged 3 commits into from
Nov 14, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
use thread index
datawhores committed Nov 14, 2024
commit dd07675880aa7b34d4ffa916f2beb4e6e7ed6010
3 changes: 2 additions & 1 deletion cyberdrop_dl/scraper/crawlers/socialmediagirls_crawler.py
Original file line number Diff line number Diff line change
@@ -95,7 +95,8 @@ async def forum(self, scrape_item: ScrapeItem) -> None:
scrape_item.children_limit = self.manager.config_manager.settings_data["Download_Options"][
"maximum_number_of_children"
][scrape_item.type]
post_sections = (scrape_item.url.parts[3], scrape_item.url.fragment)
thread_index=scrape_item.url.parts.index("threads")
post_sections = (scrape_item.url.parts[thread_index+1], scrape_item.url.fragment)
if len(scrape_item.url.parts) > 3 and any("post-" in sec for sec in post_sections):
url_parts = str(scrape_item.url).rsplit("post-", 1)
thread_url = URL(url_parts[0].rstrip("#"))