Reddit works - BBC works! :)


In [1]:
import requests
import json
import random

In [3]:
getRed = requests.get(u'http://reddit.com/r/redditgetsdrawn.json')
oldRed = json.loads(getRed.text)

anoRed = oldRed[u'data'][u'children']
for ano in anoRed:
    z = ano[u'data'][u'url']
    
print z


http://m.imgur.com/PTyQA58

In [96]:
getBbc = requests.get(u'http://api.bbcnews.appengine.co.uk/stories/world')
oldBbc = json.loads(getBbc.text)
#print oldBbc
anoBbc = oldBbc[u'topic']
print anoBbc


{u'id': u'world', u'title': u'World'}

In [97]:
ehhBbc = oldBbc[u'topic'][u'title']
print ehhBbc


World

In [98]:
storBbc = oldBbc[u'stories']

In [99]:
print storBbc


[{u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69862000/jpg/_69862323_019316585-1.jpg', u'published': 1379297322, u'link': u'http://www.bbc.co.uk/news/world-middle-east-24104733#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'French President Francois Hollande says the deal on Syria\'s chemical weapons is an "important step", as he prepares to host further talks in Paris.', u'title': u'France welcomes US-Russia Syria deal'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69862000/jpg/_69862342_018957403.jpg', u'published': 1379298820, u'link': u'http://www.bbc.co.uk/news/world-asia-24104774#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'South Korean workers return to the Kaesong industrial park in North Korea, five months after work was suspended amid severe political tension.', u'title': u'Two Koreas begin Kaesong restart'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69862000/jpg/_69862462_69859419.jpg', u'published': 1379299393, u'link': u'http://www.bbc.co.uk/news/world-europe-24104741#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'One of the one of the largest salvage operations ever attempted is set to begin in Italy with efforts to pull the shipwrecked Costa Concordia upright.', u'title': u'Costa Concordia salvage to begin'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69861000/jpg/_69861451_69861443.jpg', u'published': 1379292646, u'link': u'http://www.bbc.co.uk/news/world-latin-america-24098184#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'At least 19 people have been killed in Mexico as the country is battered by a hurricane and a tropical storm.', u'title': u'Mexico storms kill at least 19'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69862000/jpg/_69862061_summers_getty.jpg', u'published': 1379292152, u'link': u'http://www.bbc.co.uk/news/business-24103970#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'Former US Treasury Secretary Larry Summers withdraws his candidacy to succeed Ben Bernanke as head of the US central bank, the Federal Reserve.', u'title': u'Summers pulls out of US Fed race'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69862000/jpg/_69862234_69862201.jpg', u'published': 1379285969, u'link': u'http://www.bbc.co.uk/news/world-europe-24098786#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'Close allies of German Chancellor Angela Merkel are claiming victory in Bavarian polls seen as a yardstick ahead of a general election next week.', u'title': u'Merkel allies claim Bavaria vote win'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69861000/jpg/_69861127_69861095.jpg', u'published': 1379281928, u'link': u'http://www.bbc.co.uk/news/world-latin-america-24103931#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u"The first openly gay mayor in Mexico's history, Benjamin Medrano, has being sworn in at a ceremony in the city of Fresnillo.", u'title': u'Mexico swears in openly gay mayor'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69862000/jpg/_69862125_69862119.jpg', u'published': 1379282230, u'link': u'http://www.bbc.co.uk/news/world-asia-24104436#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u"The most senior woman police officer in Afghanistan's troubled Helmand province is shot and injured by unknown gunmen, an official says.", u'title': u'Top Afghanistan policewoman injured'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69860000/gif/_69860963_obamarouhani.gif', u'published': 1379266514, u'link': u'http://www.bbc.co.uk/news/world-middle-east-24102723#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'US President Obama says Iran should take heed from the deal on Syria\'s chemical weapons, calling the Iranian nuclear dispute a "larger issue".', u'title': u"Syria 'lesson' for Iran - Obama"}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69857000/jpg/_69857420_69856247.jpg', u'published': 1379262162, u'link': u'http://www.bbc.co.uk/news/world-middle-east-24100632#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'A fresh wave of bombs hits Iraq cities killing more than 40 people in predominantly Shia areas as a spike in violence shows no sign of abating.', u'title': u'Fresh wave of bombs hits Iraq cities'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69855000/jpg/_69855924_hi019309647.jpg', u'published': 1379261555, u'link': u'http://www.bbc.co.uk/news/world-asia-24098788#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u"Thousands of Cambodians are protesting, for the second weekend in a row, against the ruling party's narrow election win, amid minor clashes.", u'title': u'New poll protest over Cambodia poll'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69858000/jpg/_69858475_69729327.jpg', u'published': 1379253841, u'link': u'http://www.bbc.co.uk/news/world-africa-24098791#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u"One of Nigeria's most senior Anglican clerics, Ignatius Kattey, is freed more than a week after being kidnapped by armed men, officials say.", u'title': u'Nigerian kidnappers free archbishop'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69852000/jpg/_69852572_69852378.jpg', u'published': 1379266662, u'link': u'http://www.bbc.co.uk/news/world-us-canada-24097775#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'A US woman, Janice "Lokelani" Keihanaikukauakahihuliheekahaunaele wins a battle to have her full name put on official papers.', u'title': u'US woman celebrates name victory'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69845000/jpg/_69845416_157056652.jpg', u'published': 1379163602, u'link': u'http://www.bbc.co.uk/sport/0/football/24091441', u'description': u'Italian side Genoa suspend a youth-team coach after he was caught in bushes spying on rivals Sampdoria ahead of a derby meeting.', u'title': u'Coach is caught spying in bushes'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69853000/jpg/_69853224_mayweather.jpg', u'published': 1379237393, u'link': u'http://www.bbc.co.uk/sport/0/boxing/24098501', u'description': u"America's Floyd Mayweather produces an imperious display of boxing in Las Vegas to see off Mexico's Saul Alvarez.", u'title': u'Superb Mayweather defeats Alvarez'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69854000/jpg/_69854260_69853525.jpg', u'published': 1379235507, u'link': u'http://www.bbc.co.uk/news/entertainment-arts-24099288#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u"Director Woody Allen will receive the prestigious Cecil B DeMille award for contribution to cinema at next year's Golden Globes.", u'title': u'Woody Allen gets honorary Globe'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69852000/jpg/_69852671_69852659.jpg', u'published': 1379209035, u'link': u'http://www.bbc.co.uk/news/world-latin-america-24095300#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'Argentine President Cristina Fernandez de Kirchner criticises "small sectors" for an alleged campaign against her government.', u'title': u"Argentina president attacks 'elite'"}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69841000/jpg/_69841665_69841382.jpg', u'published': 1379115209, u'link': u'http://www.bbc.co.uk/news/world-latin-america-24089050#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'Argentine police arrest a 19-year-old man accused of hacking into money transfer and gambling websites, who allegedly made $50,000 a month.', u'title': u"Argentine teenage 'superhacker' held"}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69849000/jpg/_69849136_69846285.jpg', u'published': 1379179454, u'link': u'http://www.bbc.co.uk/news/world-africa-24095890#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'Two people are killed by grenade blasts in 24 hours in the Rwandan capital Kigali ahead of a parliamentary vote on Monday.', u'title': u'Rwanda blasts kill two ahead of poll'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69847000/jpg/_69847489_69847447.jpg', u'published': 1379173022, u'link': u'http://www.bbc.co.uk/news/world-middle-east-24093975#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'An Egyptian judge orders a media blackout during the next phase of the retrial of former President Hosni Mubarak.', u'title': u'Mubarak judge orders trial blackout'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69857000/jpg/_69857085_2811a426-d59f-4124-90e5-172297805277.jpg', u'published': 1379246438, u'link': u'http://www.bbc.co.uk/news/world-asia-24100248#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'The Philippine army says it is closing in on about 180 armed rebels, after a week-long siege in the southern city of Zamboanga.', u'title': u"Philippine army 'surrounds rebels'"}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69860000/gif/_69860112_pakistan_khyber304.gif', u'published': 1379259535, u'link': u'http://www.bbc.co.uk/news/world-asia-24102055#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'Two senior Pakistani military officers and a soldier are killed by Taliban militants near the border with Afghanistan.', u'title': u"Pakistan officers 'killed by Taliban'"}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69860000/jpg/_69860089_69858403.jpg', u'published': 1379259751, u'link': u'http://www.bbc.co.uk/news/business-24102465#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u"The so-called troika of lenders arrives in Lisbon to review Portugal's economic progress and determine whether it should receive a bailout instalment.", u'title': u'Portugal faces latest bailout review'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69849000/jpg/_69849698_69847109.jpg', u'published': 1379180660, u'link': u'http://www.bbc.co.uk/news/world-europe-24093924#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'Tens of thousands of Poles march through Warsaw in the finale of a four-day protest against proposed labour law changes.', u'title': u'Poles in mass anti-government march'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69832000/jpg/_69832049_7uh5buiu.jpg', u'published': 1379078844, u'link': u'http://www.bbc.co.uk/news/world-middle-east-24083314#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'Al-Qaeda leader Ayman al-Zawahiri urges "lone-wolf" attacks to damage the US economy, in a message marking the anniversary of 11 September.', u'title': u'Zawahiri seeks to harm US economy'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69836000/gif/_69836866_yemen_hajjah_0913.gif', u'published': 1379087498, u'link': u'http://www.bbc.co.uk/news/world-middle-east-24083127#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u"Yemen's human rights minister asks parliament to set a minimum age for marriage, amid reports that an eight-year-old girl died on her wedding night.", u'title': u'Yemen minister seeks child bride law'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69862000/jpg/_69862360_69862348.jpg', u'published': 1379296720, u'link': u'http://www.bbc.co.uk/news/uk-24104743#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'Those who commit benefit fraud will face increased prison sentences of up to 10 years, under new guidelines issued by the director of public prosecutions.', u'title': u"Benefit cheats 'face 10-year terms'"}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69861000/jpg/_69861980_69861969.jpg', u'published': 1379286010, u'link': u'http://www.bbc.co.uk/news/uk-politics-24103857#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'Business Secretary Vince Cable pledges to end the abuse of zero-hours contracts, as he unveils policies to support a "fairer" economic recovery at the Lib Dem conference in Glasgow.', u'title': u"Cable vows action on 'zero hours'"}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69853000/jpg/_69853817_69853782.jpg', u'published': 1379235316, u'link': u'http://www.bbc.co.uk/news/world-asia-24099022#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'Japan faces its longest period without nuclear power for four decades, as it shuts down its last reactor amid public concerns after Fukushima.', u'title': u'Japan halts last nuclear reactor'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69842000/jpg/_69842725_69842703.jpg', u'published': 1379148091, u'link': u'http://www.bbc.co.uk/news/world-asia-24090322#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'Japan launches the first in a new generation of rockets into space, hoping the design will make missions more affordable.', u'title': u"Japan launches 'affordable' rocket"}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69832000/jpg/_69832065_68735930.jpg', u'published': 1379079296, u'link': u'http://www.bbc.co.uk/news/business-24083813#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'US retail sales rise at a slower-than-expected rate in August, despite increased demand for high-priced, one-off items such as cars.', u'title': u'US retail sales growth slowing'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69854000/jpg/_69854166_69854087.jpg', u'published': 1379267421, u'link': u'http://www.bbc.co.uk/sport/0/football/24099077', u'description': u'Cristiano Ronaldo agrees to extend his time at Real Madrid for a reported 17m euros (\xa314.25m) a year until 2018.', u'title': u'Ronaldo agrees new Real Madrid deal'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69860000/jpg/_69860162_horner_getty.jpg', u'published': 1379263912, u'link': u'http://www.bbc.co.uk/sport/0/cycling/24101494', u'description': u"America's Chris Horner becomes the oldest Grand Tour winner with victory in the Vuelta a Espana aged 41.", u'title': u'American Horner, 41, wins Vuelta'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69860000/jpg/_69860055_69860054.jpg', u'published': 1379257950, u'link': u'http://www.bbc.co.uk/sport/0/triathlon/24101484', u'description': u"Britain's Jonathan Brownlee loses his world title to Spaniard Javier Gomez in a sprint finish in London.", u'title': u'Gomez beats Brownlees to world title'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69860000/jpg/_69860743_4f813379-8ed1-4f01-ac1a-55c4b624be16.jpg', u'published': 1379268226, u'link': u'http://www.bbc.co.uk/news/entertainment-arts-24100339#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'Rock group Arctic Monkeys score a fifth number one with their latest album, AM, while Katy Perry holds on to the top of the singles chart.', u'title': u'Arctic Monkeys land fifth number one'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69842000/jpg/_69842329_hi019069876.jpg', u'published': 1379143624, u'link': u'http://www.bbc.co.uk/news/world-us-canada-24090094#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'US rapper Kanye West is charged with battery and attempted theft over a fight with a photographer at Los Angeles Airport in July.', u'title': u'Kanye West charged in paparazzo row'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69855000/jpg/_69855083_guncrop.jpg', u'published': 1379239626, u'link': u'http://www.bbc.co.uk/news/entertainment-arts-24099293#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'A working gun, created using a 3D printer, is acquired for display by the Victoria and Albert Museum in London.', u'title': u'V&A museum to display printed gun'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69857000/jpg/_69857092_69854443.jpg', u'published': 1379251621, u'link': u'http://www.bbc.co.uk/news/world-asia-24099848#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'A Japanese festival where wooden shrines weighing up to four tonnes are pulled through the streets at speed has been taking place.', u'title': u'VIDEO: Japanese floats race through streets'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69852000/jpg/_69852832_69852593.jpg', u'published': 1379217864, u'link': u'http://www.bbc.co.uk/news/world-us-canada-24098120#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'Janice "Lokelani" Keihanaikukauakahihuliheekahaunaele has won a battle to have her full name put on her driving licence.', u'title': u'VIDEO: Woman with long name wins battle'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69861000/jpg/_69861590_69860202.jpg', u'published': 1379269743, u'link': u'http://www.bbc.co.uk/news/world-middle-east-24103542#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'The BBC\'s Jeremy Bowen says Syria\'s government troops are stepping up their offensive against rebel forces as the "religious mosaic of different sects breaks up".', u'title': u"VIDEO: Syrians 'no longer trust neighbours'"}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69854000/jpg/_69854436_69853660.jpg', u'published': 1379237183, u'link': u'http://www.bbc.co.uk/news/world-europe-24099031#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'The Costa Concordia cruise ship is set to be hauled upright for the first time since it partially capsized in January 2012.', u'title': u'VIDEO: Stricken ship to be hauled upright'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69860000/jpg/_69860420_69859948.jpg', u'published': 1379261469, u'link': u'http://www.bbc.co.uk/news/world-us-canada-24102915#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'President Obama has given an exclusive interview to ABC News about the Syria chemical weapons agreement and the implications this has with Iran.', u'title': u"VIDEO: Obama 'reaches out' to Iranian leader"}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69853000/jpg/_69853016_69853007.jpg', u'published': 1379228479, u'link': u'http://www.bbc.co.uk/news/world-us-canada-24098749#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'Hundreds of people have been rescued from the US state of Colorado after record-breaking heavy rain which led to days of flooding.', u'title': u'VIDEO: Hundreds rescued after Colorado floods'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69852000/jpg/_69852890_69852881.jpg', u'published': 1379219336, u'link': u'http://www.bbc.co.uk/news/world-asia-24098125#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'Fighting has resumed between government troops and Muslim rebels in the southern Philippines, despite a recently agreed ceasefire.', u'title': u'VIDEO: Clashes break Philippines ceasefire'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/55182000/gif/_55182136__48351578_640x360-world-news-1.gif', u'published': 1379292531, u'link': u'http://www.bbc.co.uk/news/10462520#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'Watch the latest news summary from BBC World News. International news updated 24 hours a day.', u'title': u'VIDEO: One-minute World News'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69861000/jpg/_69861993_69861069.jpg', u'published': 1379281162, u'link': u'http://www.bbc.co.uk/news/world-middle-east-24103801#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'Videos appear to show Iranians fighting for Assad in Syria', u'title': u'Footage claims to show Iranians in Syria'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69788000/jpg/_69788375_160090154.jpg', u'published': 1379290194, u'link': u'http://www.bbc.co.uk/news/world-asia-24044337#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u"The growing problem of alcoholism in 'dry' Pakistan", u'title': u'Pakistan battles growing alcohol addiction'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69841000/jpg/_69841025_etiquette03.jpg', u'published': 1379288031, u'link': u'http://www.bbc.co.uk/news/magazine-24085776#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'Coaching Washington children to meet the Obamas', u'title': u'VIDEO: Etiquette for a chance Obama meeting'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69246000/jpg/_69246162_nedkellyx.jpg', u'published': 1379286297, u'link': u'http://www.bbc.co.uk/news/entertainment-arts-23667587#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u"How Australia took masterpieces to London's Royal Academy", u'title': u'VIDEO: How Australia moved its masterpieces'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69642000/jpg/_69642126_anglo_21.jpg', u'published': 1379289867, u'link': u'http://www.bbc.co.uk/news/world-asia-india-23862035#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'The dwindling Anglo-Indian community in Calcutta', u'title': u'In pictures: Anglo-Indian community in India'}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69693000/jpg/_69693021_tv018314551getty.jpg', u'published': 1379288727, u'link': u'http://www.bbc.co.uk/news/magazine-23983681#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u"The Harley-Davidson days are finally over for Australia's miners", u'title': u"Boom and bust in Australia's coal country"}, {u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69840000/jpg/_69840425_mask_think624.jpg', u'published': 1379289145, u'link': u'http://www.bbc.co.uk/news/magazine-24065878#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'How recession has forced the Latin lover to rein in his appetite', u'title': u"Italy's Casanovas hit where it hurts"}]

In [100]:
faiBbc = storBbc[0]
print faiBbc


{u'thumbnail': u'http://news.bbcimg.co.uk/media/images/69862000/jpg/_69862323_019316585-1.jpg', u'published': 1379297322, u'link': u'http://www.bbc.co.uk/news/world-middle-east-24104733#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa', u'description': u'French President Francois Hollande says the deal on Syria\'s chemical weapons is an "important step", as he prepares to host further talks in Paris.', u'title': u'France welcomes US-Russia Syria deal'}

In [101]:
thumBbc = faiBbc[u'thumbnail']

print thumBbc


http://news.bbcimg.co.uk/media/images/69862000/jpg/_69862323_019316585-1.jpg

In [102]:
titlBbc = faiBbc[u'title']
print titlBbc


France welcomes US-Russia Syria deal

In [103]:
desBbc = faiBbc[u'description']
print desBbc


French President Francois Hollande says the deal on Syria's chemical weapons is an "important step", as he prepares to host further talks in Paris.

In [104]:
linBbc = faiBbc['link']
print linBbc


http://www.bbc.co.uk/news/world-middle-east-24104733#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa

In [105]:
pubBbc = faiBbc['published']

In [35]:
print pubBbc


1379296720

In [53]:
getTop = requests.get(u'http://api.bbcnews.appengine.co.uk/topics')
oldTop = json.loads(getTop.text)
print oldTop


{u'topics': [{u'id': u'headlines', u'title': u'Headlines'}, {u'id': u'world', u'title': u'World'}, {u'id': u'science_and_environment', u'title': u'Science'}, {u'id': u'technology', u'title': u'Technology'}, {u'id': u'entertainment_and_arts', u'title': u'Entertainment'}, {u'id': u'business', u'title': u'Business'}, {u'id': u'politics', u'title': u'Politics'}, {u'id': u'health', u'title': u'Health'}, {u'id': u'education', u'title': u'Education'}, {u'id': u'uk', u'title': u'UK'}, {u'id': u'england', u'title': u'England'}, {u'id': u'scotland', u'title': u'Scotland'}, {u'id': u'wales', u'title': u'Wales'}]}

In [60]:
blaTop = oldTop['topics']
print blaTop


[{u'id': u'headlines', u'title': u'Headlines'}, {u'id': u'world', u'title': u'World'}, {u'id': u'science_and_environment', u'title': u'Science'}, {u'id': u'technology', u'title': u'Technology'}, {u'id': u'entertainment_and_arts', u'title': u'Entertainment'}, {u'id': u'business', u'title': u'Business'}, {u'id': u'politics', u'title': u'Politics'}, {u'id': u'health', u'title': u'Health'}, {u'id': u'education', u'title': u'Education'}, {u'id': u'uk', u'title': u'UK'}, {u'id': u'england', u'title': u'England'}, {u'id': u'scotland', u'title': u'Scotland'}, {u'id': u'wales', u'title': u'Wales'}]

In [ ]:


In [91]:
import random
topNum = random.randint(1,8)
andTop = blaTop[topNum]
print andTop


{u'id': u'technology', u'title': u'Technology'}

In [72]:
titTop = andTop['title']
print titTop


Technology

ArtControl json


In [122]:
getArt = requests.get('http://artcontrol.me/?wpapi=get_posts&dev=0')
oldArt = json.loads(getArt.text)
#print oldBbc
anoArt = oldArt[u'posts']
#print anoArt

titArt = anoArt[5]
print titArt


{u'status': u'publish', u'category': [{u'term_group': u'0', u'count': u'81', u'name': u'draw', u'parent': u'0', u'term_id': u'7', u'cat_ID': u'7', u'category_description': u'', u'category_parent': u'0', u'cat_name': u'draw', u'category_count': u'81', u'term_taxonomy_id': u'7', u'taxonomy': u'category', u'category_nicename': u'draw', u'slug': u'draw', u'description': u''}], u'name': u'july-portrait', u'parent': u'0', u'title': u'July portrait', u'url': u'http://artcontrol.me/?p=5166', u'author': [{u'first_name': u'Will', u'last_name': u'mckee', u'name': u'Will', u'nicename': u'wmckee', u'url': u'', u'slug': u'wmckee', u'gravatar': u'http://www.gravatar.com/avatar/5e2931ce807064cea9fc263f5346ad86?s=100&d=mm&r=g', u'id': u'1', u'description': u''}], u'excerpt': u"Hi. I've been busy with unity3d but get in a pencil drawing now and then. I think I've lost my pen for my tablet. Its likely somewhere in my room. Looking on mightyape I see", u'modified': u'2013-07-12 03:53:44', u'slug': u'July portrait', u'comment_count': u'0', u'tag': [{u'term_group': u'0', u'count': u'22', u'name': u'female', u'parent': u'0', u'term_id': u'19', u'term_taxonomy_id': u'19', u'taxonomy': u'post_tag', u'slug': u'female', u'description': u''}, {u'term_group': u'0', u'count': u'33', u'name': u'pencil', u'parent': u'0', u'term_id': u'10', u'term_taxonomy_id': u'10', u'taxonomy': u'post_tag', u'slug': u'pencil', u'description': u''}, {u'term_group': u'0', u'count': u'31', u'name': u'portrait', u'parent': u'0', u'term_id': u'20', u'term_taxonomy_id': u'20', u'taxonomy': u'post_tag', u'slug': u'portrait', u'description': u''}], u'date': u'2013-07-12 03:53:44', u'type': u'post', u'id': u'5166', u'comment_status': u'open'}

In [123]:
exArt = titArt[u'excerpt']

In [124]:
print exArt


Hi. I've been busy with unity3d but get in a pencil drawing now and then. I think I've lost my pen for my tablet. Its likely somewhere in my room. Looking on mightyape I see

In [125]:
namArt = titArt[u'title']
print namArt


July portrait

In [126]:
urlArt = titArt[u'url']
print urlArt


http://artcontrol.me/?p=5166

In [127]:
datArt = titArt[u'date']
print datArt


2013-07-12 03:53:44

In [ ]: