Eulercoder / fabulous

Fabulous Bot for Slack!
GNU General Public License v3.0
18 stars 22 forks source link

Use requests instead of urllib #42

Closed SanketDG closed 6 years ago

SanketDG commented 6 years ago

https://stackoverflow.com/questions/2018026/what-are-the-differences-between-the-urllib-urllib2-and-requests-module

vicky002 commented 6 years ago

@Buffer0x7cd we did this right?

Buffer0x7cd commented 6 years ago

yeah, it's done

SanketDG commented 6 years ago

I still see some urllib.request imports though

vicky002 commented 6 years ago

Hey @SanketDG (Long time no see 👋 )

can you mention the files here? That would help @Buffer0x7cd in fixing.

SanketDG commented 6 years ago

Hey @SanketDG (Long time no see :wave: )

Haha hey!

can you mention the files here? That would help @Buffer0x7cd in fixing.

Sure:

fabulous/slack.py:    from urllib.parse import urlencode
fabulous/slack.py:    from urllib.request import urlopen
fabulous/slack.py:    from urllib import urlencode
fabulous/slack.py:    from urllib2 import urlopen

Most of these are probably redundant imports, from what I see

Edit, one more

fabulous/services/directions.py:import json, urllib
Buffer0x7cd commented 6 years ago

I have made the changes and issued a PR (#71 ) to fix the issue. @SanketDG @vicky002