laramies / metagoofil

Metadata harvester
GNU General Public License v2.0
1.03k stars 202 forks source link

fix google search return 301 or 302 bug #15

Open oaoouo opened 6 years ago

oaoouo commented 6 years ago

Hi laramies, Thanks for your metagoofil ! I think I solve the problem https://github.com/laramies/metagoofil/issues/14 in this pr

search_google function return 301 status code because google use https but metagoofil send http request, so I change httplib.HTTP to httplib.HTTPS . then search_google return 302 status code, because self.server is www.google.com.hk(not www.google.com) in my area(Chinese), so I add a commandline parameter -a represent area,

$ python metagoofil.py -d apple.com -t doc -l 100 -n 50 -o applefiles -f apple.html -a hk  

and it works! metagoofil_result

My English is not good, please forgive me⁄(⁄ ⁄•⁄ω⁄•⁄ ⁄)⁄