image_search icon indicating copy to clipboard operation
image_search copied to clipboard

requested changes from commit after issue #5

Open loopyd opened this issue 7 years ago • 3 comments

from issue #5:

  • includes the hash argument as an option with affecting the url argument's functionality (you can still use the program as before, but now with the addition of --hash yes if you wish
  • includes the error counter you voiced you liked, as a property of download_image
  • slight output cleanup - errors where being printed twice in your version (unnecessary), exception is now passed directly once to error() and printed optimally
  • no extra config file needed, this one directly uses properties of download_image

loopyd avatar Mar 10 '18 23:03 loopyd

FYI, your change to use io.open instead of open produces the same error i was intending to fix in python 2.7 with my structural workarounds. be advised you will have to patch this. i left it intact to show you why this occours. (check travis)

The correct method for 2.7, is:

        with io.open('dataset/logs/google/source.html', 'w', encoding='utf-8') as f:

The python 3 syntax works and should be left as it is.

Sorry there where two here, forgot the encoding specifier.

loopyd avatar Mar 11 '18 00:03 loopyd

Will start the review when build checks with Travis CI.

rushilsrivastava avatar Mar 11 '18 18:03 rushilsrivastava

Opening the file with utf-8 encoding should be enough, correct? Could you give me an example to test with?

rushilsrivastava avatar Mar 11 '18 21:03 rushilsrivastava