NadalVRoMa / PyLibGen

A python script to download books from libgen.io
74 stars 11 forks source link

Added base code for using multiple mirrors #4

Closed saifat29 closed 7 years ago

saifat29 commented 7 years ago

Reference - Issue #1 On bookfi four mirrors are provided, we are already using the first mirror as default download mirror. I tried to implement download through the rest of the three mirrors, however the following problem arose -

Mirror 1 (Default Mirror/Currently in use) - Working Completely fine. Mirror 2 - Blocking crawlers, my IP is banned for 24 hrs. screen shot 2017-10-21 at 11 54 42 am Mirror 3 - Unable to get a direct download url as they are using MD5 hash to store the books. Mirror 4 - Unable to get a direct download url as they are using MD5 hash to store the books.

Although, I have implemented the base code for using multiple mirrors, this way integrating mirrors in future will be easy.

NadalVRoMa commented 7 years ago

Hey, since we don't have full support for the other mirrors I disabled the option on settings.py and changed a bit your code to not depend on the MULTIPLE_MIRRORS variable.