rushilsrivastava / image_search

Python Library to download images and metadata from popular search engines.
https://pypi.org/project/image-search/
MIT License
126 stars 34 forks source link

requested changes from commit after issue #5 #8

Open loopyd opened 6 years ago

loopyd commented 6 years ago

from issue #5:

loopyd commented 6 years ago

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.

rushilsrivastava commented 6 years ago

Will start the review when build checks with Travis CI.

rushilsrivastava commented 6 years ago

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