{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import requests\n", "import json\n", "import time\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Create a WebarchivSession Object with convenience methods for easy access with your API-Key " ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "from webarchiv import WebarchivSession\n", "\n", "apikey = 'Zz2tQls7fuaocX2pjrfc2npojqbGwXL2'\n", "w = WebarchivSession(apikey)\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "load metadata files from Webarchive Austria" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "selective_crawls = requests.get('https://webarchiv.onb.ac.at/data/selective.json').json()\n", "event_crawls = requests.get('https://webarchiv.onb.ac.at/data/events.json').json()\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Get the number of captures of all seeds of the Event Crawl Song Contest 2015" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "74 Captures for http://conchitawurst.com\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "8 Captures for http://conchitawurst.com/news/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "6 Captures for http://de.wikipedia.org/wiki/Eurovision_Song_Contest_2015\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "5 Captures for http://de.wikipedia.org/wiki/The_Makemakes\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "32 Captures for http://debatte.orf.at/stories/1754300/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "59 Captures for http://derstandard.at/r2000004087668/Song-Contest-2015\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "32 Captures for http://derstandard.at/r2000015639396/Eurovisions---Song-Contest-Blog\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "238 Captures for http://diepresse.com/home/kultur/songcontest/index.do\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "5 Captures for http://goodnight.at/magazin/kultur/516-60-eurovision-songcontest-in-wien\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "32 Captures for http://kundendienst.orf.at/programm/fernsehen/orf1/songcontest2015.html\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "150 Captures for http://kurier.at/kultur/song-contest\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "11 Captures for http://medienportal.univie.ac.at/uniview/forschung/detailansicht/artikel/song-contest-zwischen-pop-und-politik/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "32 Captures for http://oe3.orf.at/stories/2679710\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "9976 Captures for http://orf.at/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "32 Captures for http://orf.at/stories/2254095/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "33 Captures for http://orf.at/stories/2254095/2254088/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "33 Captures for http://orf.at/stories/2254095/2254098/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "1383 Captures for http://songcontest.orf.at/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "35 Captures for http://steiermark.orf.at/news/stories/2684488/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "32 Captures for http://tvthek.orf.at/topic/Eurovision-Song-Contest-2015/9137507\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "32 Captures for http://tvthek.orf.at/topic/Oesterreich-beim-Song-Contest/9174892\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "35 Captures for http://wien.orf.at/news/stories/2648040/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "38 Captures for http://wien.orf.at/news/stories/2648857/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "42 Captures for http://wien.orf.at/news/stories/2649515/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "36 Captures for http://wien.orf.at/news/stories/2661128/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "43 Captures for http://wien.orf.at/news/stories/2661370/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "39 Captures for http://wien.orf.at/news/stories/2661798/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "43 Captures for http://wien.orf.at/news/stories/2661804/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "40 Captures for http://wien.orf.at/news/stories/2661845/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "38 Captures for http://wien.orf.at/news/stories/2661855/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "43 Captures for http://wien.orf.at/news/stories/2661910/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "36 Captures for http://wien.orf.at/news/stories/2662093/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "44 Captures for http://wien.orf.at/news/stories/2662947/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "45 Captures for http://wien.orf.at/news/stories/2663106/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "40 Captures for http://wien.orf.at/news/stories/2664083/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "40 Captures for http://wien.orf.at/news/stories/2666541/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "45 Captures for http://wien.orf.at/news/stories/2666581/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "44 Captures for http://wien.orf.at/news/stories/2668462/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "40 Captures for http://wien.orf.at/news/stories/2670490/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "39 Captures for http://wien.orf.at/news/stories/2676170/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "36 Captures for http://wien.orf.at/news/stories/2678309/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "37 Captures for http://wien.orf.at/news/stories/2679672/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "37 Captures for http://wien.orf.at/news/stories/2680454/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "34 Captures for http://wien.orf.at/news/stories/2682245/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "39 Captures for http://wien.orf.at/news/stories/2683703/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "94 Captures for http://wien.orf.at/news/stories/2684423/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "105 Captures for http://wien.orf.at/news/stories/2687164/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "53 Captures for http://wien.orf.at/news/stories/2706977/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "287 Captures for http://wien.orf.at/news/tags/esc\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "120 Captures for http://www.apa.at/Site/ESC2015/index.html\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "65 Captures for http://www.austria-trend.at/blog/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "6 Captures for http://www.bmlfuw.gv.at/umwelt/nachhaltigkeit/green-events/projekte/kultur_und_musik/green_song_contest.html\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "832 Captures for http://www.eurovision.tv/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "151 Captures for http://www.heute.at/song+contest./\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "65 Captures for http://www.krone.at/song-contest\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "32 Captures for http://www.news.at/a/song-contest-telegramm-2015\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "344 Captures for http://www.oe24.at/kultur/song-contest\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "18 Captures for http://www.oeticket.com/de/kuenstler/eurovision-song-contest-1020/profile.html\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "32 Captures for http://www.picturedesk.com/ESC2015\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "5 Captures for http://www.railtours.at/sonderangebote/oesterreich/wien/eurovision-song-contest-2015\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "5 Captures for http://www.railtours.at/sonderangebote/oesterreich/wien/eurovision-song-contest-2015-family-show-finale.html\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "5 Captures for http://www.railtours.at/sonderangebote/oesterreich/wien/eurovision-song-contest-2015-jury-show-finale.html\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "5 Captures for http://www.railtours.at/sonderangebote/oesterreich/wien/eurovision-song-contest-2015-public-viewing-in-wien.html\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "5 Captures for http://www.railtours.at/sonderangebote/oesterreich/wien/eurovision-song-contest-2015-semifinale-1-2.html\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "10 Captures for http://www.songcontest.at/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "2 Captures for http://www.stadthalle.com/de/schauen/events/75/Eurovision-Song-Contest\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "154 Captures for http://www.vienna.at/specials/eurovision-song-contest\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "5 Captures for http://www.wien-event.at/events/song-contest/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "5 Captures for http://www.wien-ticket.at/de/service/Eurovision-Song-Contest-Wiener-Stadthalle-Wien\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "32 Captures for http://www.wien.info/de/musik-buehne/eurovision-song-contest\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "6 Captures for http://www.wienerlinien.at/eportal2/ep/tab.do/pageTypeId/74690\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "100 Captures for http://www.wienerzeitung.at/dossiers/eurovision_song_contest_2015/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "32 Captures for https://instagram.com/esc_buildingbridges/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "32 Captures for https://instagram.com/themakemakes/\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "32 Captures for https://twitter.com/ESC2015ORF\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "32 Captures for https://twitter.com/Eurovision\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "32 Captures for https://twitter.com/hashtag/eurovision?src=hash\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "63 Captures for https://www.facebook.com/ESCBuildingBridges\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "57 Captures for https://www.facebook.com/EurovisionSongContest\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "112 Captures for https://www.facebook.com/themakemakes\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "2 Captures for https://www.stadthalle.com/de/schauen/events/75/Eurovision-Song-Contest\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "47 Captures for https://www.wien.gv.at/kultur/esc/\n" ] } ], "source": [ "for crawl in event_crawls:\n", " if crawl['name'] == 'Song Contest 2015':\n", " for group in crawl['groups']:\n", " for seed in group['seeds']:\n", " response = w.wayback_search(seed)\n", " print(response.json()['total'] , ' Captures for ' , seed)\n", "\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.6" } }, "nbformat": 4, "nbformat_minor": 0 }