pionxzh / Pornhub.js

Powerful PornHub API for Node.js
MIT License
93 stars 17 forks source link

Randomly got an error from random() #74

Closed iced-queen closed 1 year ago

iced-queen commented 1 year ago

Error:

Error: 403 Forbidden at https://www.pornhub.com/random`
 at Request.checkStatus (C:\Users\Administrator\Desktop\...\...\node_modules\pornhub.js\dist\index.js:613:27)
pionxzh commented 1 year ago

I think this one couldn't be fixed on the library side....

pionxzh commented 1 year ago

Let me know if you find any pattern on this.

iced-queen commented 1 year ago

Can't you use while for example? Like you could retry the process "while" an error is 403.

pionxzh commented 1 year ago

See https://github.com/pionxzh/Pornhub.js/issues/68#issuecomment-1644375918 Doing this on the library side is troublesome, and hard for the user to customize the behavior and strategy.