Skip to content

Fortune Cookie dummy API(p220)#6

Open
koki0702 wants to merge 6 commits intomadscheme:masterfrom
koki0702:hotfix-api2
Open

Fortune Cookie dummy API(p220)#6
koki0702 wants to merge 6 commits intomadscheme:masterfrom
koki0702:hotfix-api2

Conversation

@koki0702
Copy link

In the book at p.220, "Fortune Cookie" API doesn't work.

>>> import urllib.request as ur
>>> url = 'http://www.iheartquotes.com/api/v1/random'
>>> conn = ur.urlopen(url)
>>> print(conn)
<http.client.HTTPResponse object at 0x1006fad50>

So I created a dummy API.

The url is
https://raw.githubusercontent.com/koki0702/introducing-python/master/dummy_api/fortune_cookie_random1.txt
or
https://raw.githubusercontent.com/koki0702/introducing-python/master/dummy_api/fortune_cookie_random2.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant