Ryuk-me / Torrent-Api-py

An Unofficial API for 1337x, Piratebay, Nyaasi, Torlock, Torrent Galaxy, Zooqle, Kickass, Bitsearch, MagnetDL,Libgen, YTS, Limetorrent, TorrentFunk, Glodls, TorrentProject and YourBittorrent
https://torrent-api-py-nx0x.onrender.com/docs
MIT License
319 stars 233 forks source link

Always 403 Forbidden on 1337x? #59

Closed sandipndev closed 1 year ago

sandipndev commented 1 year ago

The http://localhost:8009/api/v1/search?site=1337x&query=avengers page was loading for a long time. So I went ahead and printed out the response:

This is the logs:

<ClientResponse(https://1337x.to/search/avengers/226/) [403 Forbidden]>
<CIMultiDictProxy('Date': 'Sat, 05 Aug 2023 11:41:25 GMT', 'Content-Type': 'text/html; charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Connection': 'close', 'Cross-Origin-Embedder-Policy': 'require-corp', 'Cross-Origin-Opener-Policy': 'same-origin', 'Cross-Origin-Resource-Policy': 'same-origin', 'Origin-Agent-Cluster': '?1', 'Permissions-Policy': 'accelerometer=(),autoplay=(),camera=(),clipboard-read=(),clipboard-write=(),geolocation=(),gyroscope=(),hid=(),interest-cohort=(),magnetometer=(),microphone=(),payment=(),publickey-credentials-get=(),screen-wake-lock=(),serial=(),sync-xhr=(),usb=()', 'Referrer-Policy': 'same-origin', 'X-Frame-Options': 'SAMEORIGIN', 'cf-mitigated': 'challenge', 'Cache-Control': 'private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'Expires': 'Thu, 01 Jan 1970 00:00:01 GMT', 'Report-To': '{"endpoints":[{"url":"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=Hvmo1kU2Ujcb%2FzsBCn%2BbF%2FTiZIy6vofMYx7niEY0EtJtmnPt7fDXVJVqGehfPzNVDQxKEWtoguFbCuERrG7zULRZS5lyhBVPz5zS3CSpo4nDjpYngbN0GTg%2BBw%3D%3D"}],"group":"cf-nel","max_age":604800}', 'NEL': '{"success_fraction":0,"report_to":"cf-nel","max_age":604800}', 'Vary': 'Accept-Encoding', 'Server': 'cloudflare', 'CF-RAY': '7f1ec5574e4468b5-BUD', 'Content-Encoding': 'gzip', 'alt-svc': 'h3=":443"; ma=86400')>

Are you able to query 1337x? I was using a tor proxy though. 1337x is blocked by default in my country. It could be that it is doing some Cloudflare verification. Will debug more.

sandipndev commented 1 year ago

Okay, indeed that was the case.