Skip to content

fix: xhamster crawler support for xhamster45.desi#166

Merged
NTFSvolume merged 11 commits into
NTFSvolume:mainfrom
Barbarella6666666:fix-xhamster45.desi
Apr 20, 2026
Merged

fix: xhamster crawler support for xhamster45.desi#166
NTFSvolume merged 11 commits into
NTFSvolume:mainfrom
Barbarella6666666:fix-xhamster45.desi

Conversation

@Barbarella6666666
Copy link
Copy Markdown
Collaborator

xHamster crawler failed on xhamster45.desi due to different JSON structure using xplayerSettings instead of xplayerSettings2.

  • Added fallback in _get_xplayer_sources(): tries xplayerSettings2 first, then xplayerSettings
  • Implemented HLS stream preference in video() method when available
  • Tests fixed to also work on Windows systems

Copy link
Copy Markdown
Owner

@NTFSvolume NTFSvolume left a comment

Choose a reason for hiding this comment

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

I think it should be the other way around. We should prefer direct downloads over HLS.

HLS downloads are more complex and therefore more likely to fail + less efficient

The original code used to parse both xplayerSettings and xplayerSettings2 but I removed xplayerSettings cause their MP4s were always a 403. I assume that why you gave priority to HLS?

It's that case I think is better to:

  • Parse formats from xplayerSettings2 (HLS and MP4)
  • Parse only HLS formats from xplayerSettings
  • Download the best MP4. It's none available, fallback to the best HLS

- Parsing only HLS from xplayerSettings
- Parsing HLS and MP4 from xplayerSettings2
- Downloading best MP4 as default behaviour. If none available, fallback
  to the best HLS
@NTFSvolume NTFSvolume self-requested a review April 20, 2026 19:56
@NTFSvolume
Copy link
Copy Markdown
Owner

xplayerSettings2 does not exists anymore even on the .com domain

@NTFSvolume NTFSvolume merged commit 5516e0a into NTFSvolume:main Apr 20, 2026
9 checks passed
@NTFSvolume NTFSvolume added the bug Something isn't working label Apr 20, 2026
@Barbarella6666666 Barbarella6666666 deleted the fix-xhamster45.desi branch April 22, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants