diff --git a/configs/origo/content_not_available_at_crawl.txt b/configs/origo/content_not_available_at_crawl.txt new file mode 100644 index 0000000..a67a32a --- /dev/null +++ b/configs/origo/content_not_available_at_crawl.txt @@ -0,0 +1,43 @@ +https://www.origo.hu/tudomany/200609214honapos.html +https://www.origo.hu/nagyvilag/20100129-kabitoszert-csempeszett-egy-delafrikai-miniszter-felesege.html +https://www.origo.hu/auto/20100111-ford-focus-bemutato.html +https://www.origo.hu/teve/20120619-itthon-is-bemutatjak-aaron-sorkin-es-a-gettomilliomos-uj-sorozatat.html +https://www.origo.hu/nagyvilag/20100129-kabitoszert-csempeszett-egy-delafrikai-miniszter-felesege.html +https://www.origo.hu/filmklub/20100126-az-avatar-a-vilag-legsikeresebb-filmje.html +https://www.origo.hu/itthon/20100113-baleset-kirakatba-borult-egy-auto.html +https://www.origo.hu/itthon/20100122-iskolai-szalagavatok-artisjus-jogdijat-kell-fizetni-az-iskolai-rendezvenyen-is.html +https://www.origo.hu/sport/futball/20100113-zigicdupla-is-keves-volt-a-valencianak.html +https://www.origo.hu/nagyvilag/20100117-eredmenytelen-lehet-a-vasarnapi-ukran-elnokvalasztas.html +https://www.origo.hu/gazdasag/20100128-a-tavho-afaja-csokkent-ugyan-de-a-hideg-miatt-nagy.html +https://www.origo.hu/auto/20100204-ford-focus-rs-elozetes.html +https://www.origo.hu/idojaras/20100202-bovulnek-a-thome-iptv-szolgaltatasai.html +https://www.origo.hu/sport/futball/20100124-szarnyal-a-napoli-zuhan-a-fiorentina-a-serie-aban.html +https://www.origo.hu/nagyvilag/20100128-maffiaellenes-intezkedeseket-fogadott-el-az-olasz-kormany.html +https://www.origo.hu/itthon/20100110-europa-kulturalis-fovarosa-pecs-essen-isztambul.html +https://www.origo.hu/teve/20050406szerdai.html +https://www.origo.hu/itthon/20100121-simonyi-andras-nem-akar-az-mdfszdszlista-elere-kerulni.html +https://www.origo.hu/tudomany/20100119-oriaskristalyok-mexikoban-bbc-film-a-vilag-legnagyobb-gipszkristalyairol.html +https://www.origo.hu/sport/futball/20100117-serie-a-kikapott-a-juventus-es-a-fiorentina.html +https://www.origo.hu/programajanlo/blog/20100120-ujra-musoron-a-frankensteinterv-januar-23-27-kozott.html +https://www.origo.hu/teve/20080303-heti-horoszkop-marcius-3tol-9ig.html +https://www.origo.hu/auto/20100111-ford-focus-bemutato.html +https://www.origo.hu/itthon/20100125-vasuti-kozlekedes-kesesek-vonatok-felrobbant-egy-transzformator-budapesten.html +https://www.origo.hu/nagyvilag/20100120-meghalt-india-kommunista-kolosszusa-dzsioti-basu-jyoti-basu.html +https://www.origo.hu/idojaras/20100203-tel-havazas-fotok-ozonenetwork-masodik-sorozat.html +https://www.origo.hu/itthon/20100126-15-ev-fegyhazra-iteltek-az-elettarsat-megolo-kecskemeti-hajlektalant.html +http://origo.hu/tudomany/szexhoroszkop/20080129-a-vizonto-erzekisege.html +https://www.origo.hu/itthon/20100127-hidegben-is-utcan-dolgoznak.html +https://www.origo.hu/programajanlo/blog/20100114-tabori-gyorgy-mein-kampf-torocsik-marival-raba-roland-rendezeseben-a.html +http://origo.hu/tudomany/20070831-mehkemenyedes-mehosszehuzodas-a-terhesseg-alatt.html +https://www.origo.hu/sport/csapat/20100107-a-ferfikezilabdaeb-menetrendje.html +http://origo.hu/tudomany/20071218-karacsonyi-keszulodes-idobeosztas-teendok-fontossagi-sorrendben.html +https://www.origo.hu/teve/20070129anap.html +https://www.origo.hu/teve/20081112-szerdai-horoszkop.html +https://www.origo.hu/auto/20100118-kia-sportage-elozetes.html +https://www.origo.hu/itthon/20100118-elefantcsontpartrol-csaptak-be-az-autojat-arulo-pecsi-not.html +https://www.origo.hu/itthon/20100118-gaz-es-villanyorak-atallitasaval-gyanusitanak-negy-embert-heves-megyeben.html +http://origo.hu/tudomany/20080926-penteki-babahoroszkop.html +http://origo.hu/tudomany/20081011-konnycsatorna-elzarodas-dacryostenosis.html +https://www.origo.hu/itthon/20100122-tagadja-a-molesztalast-a-pedofiliaval-vadolt-mohacsi-rajztanar.html +https://www.origo.hu/teve/20080208-recept-ananaszoscurrys-setressult.html +https://www.origo.hu/itthon/20100119-orban-viktor-es-az-uj-amerikai-nagykovet-talalkozoja.html \ No newline at end of file diff --git a/configs/origo/origo_BASE.xml b/configs/origo/origo_BASE.xml index 8e26f85..5623d54 100644 --- a/configs/origo/origo_BASE.xml +++ b/configs/origo/origo_BASE.xml @@ -58,9 +58,8 @@ New Wave Media Group Kft. 1443 Budapest, Pf: 201. - - - + https://doi.org/10.5281/zenodo.7037527 + Budapest @@ -69,9 +68,8 @@

AZ ORIGO KIADÓJA A NEW WAVE MEDIA GROUP KFT. © MINDEN JOG FENNTARTVA.

- - - + https://doi.org/10.5281/zenodo.7037527 +

@@ -92,13 +90,104 @@ - + WARC/1.1 - + 2022-05-18T16:11:40/2022-02-21T20:15:31 - - - + + [{ + "checksum": "af9e4eeba2260697183d6e4df70316d2", + "filename": "content_not_available_at_crawl.txt", + "filesize": 2871, + "id": "dc43ca8b-117c-415a-8f18-e8b5019a2c0b", + "links": { + "download": "https://zenodo.org/api/files/b3b77430-5462-4205-a2a6-95524fbad8e6/content_not_available_at_crawl.txt", + "self": "https://zenodo.org/api/deposit/depositions/7037527/files/dc43ca8b-117c-415a-8f18-e8b5019a2c0b" + } + }, + { + "checksum": "26673e60a1bd72b0a956fedde918f92d", + "filename": "hashsums", + "filesize": 7978, + "id": "93dd6406-1318-4625-a0e7-136d4c145238", + "links": { + "download": "https://zenodo.org/api/files/b3b77430-5462-4205-a2a6-95524fbad8e6/hashsums", + "self": "https://zenodo.org/api/deposit/depositions/7037527/files/93dd6406-1318-4625-a0e7-136d4c145238" + } + }, + { + "checksum": "8c79b98ae2d1e2b1cc41436930c5dfa2", + "filename": "known_bad_urls.txt", + "filesize": 9653, + "id": "989af136-8833-4d7a-96c9-7855e1be4a21", + "links": { + "download": "https://zenodo.org/api/files/b3b77430-5462-4205-a2a6-95524fbad8e6/known_bad_urls.txt", + "self": "https://zenodo.org/api/deposit/depositions/7037527/files/989af136-8833-4d7a-96c9-7855e1be4a21" + } + }, + { + "checksum": "122a60e4ee22eafa3bd7c01c338359e8", + "filename": "log.log", + "filesize": 904629, + "id": "d94709fc-b331-4153-8154-38c08939d0d2", + "links": { + "download": "https://zenodo.org/api/files/b3b77430-5462-4205-a2a6-95524fbad8e6/log.log", + "self": "https://zenodo.org/api/deposit/depositions/7037527/files/d94709fc-b331-4153-8154-38c08939d0d2" + } + }, + { + "checksum": "d3f9e93df719f1c078939ae36a58700a", + "filename": "logs.zip", + "filesize": 16689949, + "id": "0e86bcd3-10f3-4c71-a56f-c774b8c2acdb", + "links": { + "download": "https://zenodo.org/api/files/b3b77430-5462-4205-a2a6-95524fbad8e6/logs.zip", + "self": "https://zenodo.org/api/deposit/depositions/7037527/files/0e86bcd3-10f3-4c71-a56f-c774b8c2acdb" + } + }, + { + "checksum": "e48e7b65fb2a93001633b41c7cc5e0a5", + "filename": "origo-archive_new9.warc.gz", + "filesize": 101264331, + "id": "4b469fed-a4f7-4279-b5d3-ce7052f13c75", + "links": { + "download": "https://zenodo.org/api/files/b3b77430-5462-4205-a2a6-95524fbad8e6/origo-archive_new9.warc.gz", + "self": "https://zenodo.org/api/deposit/depositions/7037527/files/4b469fed-a4f7-4279-b5d3-ce7052f13c75" + } + }, + { + "checksum": "6cb159a4496308c3776970ca94d5d3f3", + "filename": "origo-articles_new9.warc.gz", + "filesize": 9898910598, + "id": "8cbf9b8e-5030-4902-b167-cdcbfdc6e21a", + "links": { + "download": "https://zenodo.org/api/files/b3b77430-5462-4205-a2a6-95524fbad8e6/origo-articles_new9.warc.gz", + "self": "https://zenodo.org/api/deposit/depositions/7037527/files/8cbf9b8e-5030-4902-b167-cdcbfdc6e21a" + } + }, + { + "checksum": "7fbead1f9c27cb05ebbeea3d1af9a16f", + "filename": "origo_rights_statements.warc.gz", + "filesize": 10376, + "id": "2bf4a8b1-6952-49dd-b7a4-5858249a64be", + "links": { + "download": "https://zenodo.org/api/files/b3b77430-5462-4205-a2a6-95524fbad8e6/origo_rights_statements.warc.gz", + "self": "https://zenodo.org/api/deposit/depositions/7037527/files/2bf4a8b1-6952-49dd-b7a4-5858249a64be" + } + }, + { + "checksum": "81bfcb73fd98b98224ccc9ea889d6799", + "filename": "script.sh", + "filesize": 501, + "id": "1db0fc0e-e56f-456c-a7ac-74cc2b7b8b78", + "links": { + "download": "https://zenodo.org/api/files/b3b77430-5462-4205-a2a6-95524fbad8e6/script.sh", + "self": "https://zenodo.org/api/deposit/depositions/7037527/files/1db0fc0e-e56f-456c-a7ac-74cc2b7b8b78" + } + } + ] + + ba4114fd-63db-4c2d-b058-df5dcd3fd39b Indig Balázs Fellegi Zsófia Sárközi-Lindner Zsófia + Nagy Mihály diff --git a/configs/origo/origo_notebook.ipynb b/configs/origo/origo_notebook.ipynb deleted file mode 100644 index e9ce748..0000000 --- a/configs/origo/origo_notebook.ipynb +++ /dev/null @@ -1,1237 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 22, - "id": "4b6ffe0b", - "metadata": {}, - "outputs": [], - "source": [ - "import re\n", - "import json\n", - "import locale\n", - "import requests\n", - "import importlib\n", - "import pandas as pd\n", - "from mplogger import Logger\n", - "from datetime import datetime\n", - "from bs4 import BeautifulSoup\n", - "from collections import Counter\n", - "from html2tei import parse_date\n", - "from html2tei import parse_date\n", - "from warcio.archiveiterator import ArchiveIterator\n", - "from webarticlecurator import WarcCachingDownloader\n", - "\n", - "\n", - "import origo_specific" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "id": "aed2b92f", - "metadata": {}, - "outputs": [], - "source": [ - "\n", - "\n", - "importlib.reload(origo_specific)\n", - "from origo_specific import get_meta_from_articles_spec as get_meta" - ] - }, - { - "cell_type": "markdown", - "id": "968692e1", - "metadata": {}, - "source": [ - "## NOTES\n", - "- Ezzekkel a galéria cikkekkel mi lesz? https://www.origo.hu/auto/galeria/20220317-volkswagen-t7-multivan-etsi-teszt-2022-galeria.html\n", - "- https://www.origo.hu/sport/kozvetites/20211009-magyarorszag-albania-vbselejtezo-elo-kozvetites-puskas-arena-kepek-percrol-percre.html Formátum 3\n", - "- Miért rossz az olimpiás? https://www.origo.hu/sport/olimpia/galeria/20210726-gordeszka-latvanyos-kepek.html\n", - "- A közvetítésnél mi legyen az sch:name? \n", - "- Archivum url-ek miért vannak benne az articles.warc-ban? https://www.origo.hu/hir-archivum/index.html -- BLACKLIST-elni kell őket\n", - "- Mi van a valasztas 2010-el?\n", - "\n", - "## TODO\n", - "- Move keyword extraction from script tag outside and append extra keywords if found [DONE]" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "08a321be", - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2022-04-12 12:43:30,772 INFO: Logging started\n" - ] - } - ], - "source": [ - "logger = Logger()" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "id": "c7490ff7", - "metadata": {}, - "outputs": [], - "source": [ - "# Links:\n", - "kozvetites_link = 'https://www.origo.hu/sport/kozvetites/20211202-kezilabda-noi-vilagbajnoksag-magyarorszag-szlovakia-elo-kozvetites.html'\n", - "olimpia_link = 'https://www.origo.hu/sport/olimpia/galeria/20210726-gordeszka-latvanyos-kepek.html'\n", - "\n", - "# format 1\n", - "auto_link = 'https://www.origo.hu/auto/20180523-maris-kitiltjak-a-regi-dizelautokat-egy-nemet-varosbol.html'\n", - "teches_format1 = 'https://www.origo.hu/techbazis/20080321-bittorrentes-rivalist-kap-az-apple-tv.html'\n", - "# format 2\n", - "ronaldo_link = 'https://www.origo.hu/sport/futball/20220315-ronaldo-ismet-bizonyithat-kedvenc-ellenfele-ellen-otthon-juthat-tovabb-a-bl-titkos-eselyese.html'\n", - "\n", - "# format 3\n", - "gallery_link = 'https://www.origo.hu/sport/galeria/20220317-a-szexi-luisinha-barosa-oliveira-mclaren-lando-norris-kepek-fotok-galeria.html'\n", - "\n", - "\n", - "root_problem = 'https://www.origo.hu/auto/20150904-telekocsi-migrans-mav-vonat.html'\n", - "article_center = 'https://www.origo.hu/gazdasag/hirek/20091207-csokkenessel-nyitottak-a-new-yorki-tozsdek.html'\n", - "torlendo = 'https://www.origo.hu/gazdasag/hirek/20001011torlend1.html'\n", - "old_format = 'https://www.origo.hu/amerikai-elnokvalasztas-2008/index.html'\n", - "\n", - "# ???\n", - "valasztas2010 = 'https://www.origo.hu/itthon/valasztas2010/20100210-ujabb-feltort-levelszekrenyek-utan-nyomoz-a-rendorseg.html'\n", - "\n", - "palyabea = 'https://www.origo.hu/palyabea/post/20100909-elso-proba-a-nagykoncertre.html'\n", - "root_problem = 'https://www.origo.hu/itthon/onkormanyzati-valasztas-2010/hirek/20100930-polgar-bunpartolassal-vadolja-az-ugyeszseg-az-mszp-s-polgarmestert.html'\n", - "link_list = [kozvetites_link, olimpia_link, auto_link, teches_format1, ronaldo_link, gallery_link, root_problem, article_center, torlendo, old_format, valasztas2010, palyabea]" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "c3c09edb", - "metadata": {}, - "outputs": [], - "source": [ - "def response_warc_record_gen(warc_filename):\n", - " archive_base = ArchiveIterator(open(warc_filename, 'rb'))\n", - " for rec in archive_base:\n", - " if rec.rec_type == 'response':\n", - " article_url = rec.rec_headers.get_header('WARC-Target-URI')\n", - " raw_html = rec.content_stream().read()\n", - " yield article_url, raw_html\n", - "\n", - "def response_warc_record_gen(warc_filename):\n", - " archive_base = ArchiveIterator(open(warc_filename, 'rb'))\n", - " for rec in archive_base:\n", - " if rec.rec_type == 'response':\n", - " article_url = rec.rec_headers.get_header('WARC-Target-URI')\n", - " raw_html = rec.content_stream().read()\n", - " yield article_url, raw_html\n", - "\n", - "def extract_resp_record_data(resp):\n", - " \"\"\"Extract response date, WARC ID and raw HTML from a WARC response record\"\"\"\n", - " warc_response_date = resp.rec_headers.get_header('WARC-Date')\n", - " if '.' in warc_response_date:\n", - " date_format = '%Y-%m-%dT%H:%M:%S.%fZ'\n", - " else:\n", - " date_format = '%Y-%m-%dT%H:%M:%SZ'\n", - " warc_response_datetime = datetime.strptime(warc_response_date, date_format)\n", - " warc_id = resp.rec_headers.get_header('WARC-Record-ID')\n", - " raw_html = resp.content_stream().read().decode(resp.rec_headers.get_header('WARC-X-Detected-Encoding'))\n", - "\n", - " return warc_response_datetime, warc_id, raw_html\n", - "\n", - "def from_request(link):\n", - " txt = requests.get(link).text\n", - " soup = BeautifulSoup(txt, 'lxml')\n", - " return soup\n", - "\n", - "def from_warc(warc, link):\n", - " _, _, resp = warc.get_records(link)\n", - " warc_response_datetime, warc_id, raw_html = extract_resp_record_data(resp)\n", - " soup = BeautifulSoup(raw_html, 'html.parser')\n", - " return soup\n" - ] - }, - { - "cell_type": "markdown", - "id": "0ef76ac3", - "metadata": {}, - "source": [ - "Keywords finding code" - ] - }, - { - "cell_type": "code", - "execution_count": 47, - "id": "5cdbf193", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['labdarúgás',\n", - " 'sportműsor',\n", - " 'Manchester United FC',\n", - " 'Ajax',\n", - " 'Benfica',\n", - " 'Atlético Madrid',\n", - " 'Bajnokok Ligája']" - ] - }, - "execution_count": 47, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "keywords_script = [a for a in from_request(ronaldo_link).find_all('script') if 'window.exclusionTags' in a.text][0].text\n", - "i1 = keywords_script.find('[')\n", - "i2 = keywords_script.find(']')\n", - "keywords_script[i1+1:i2].replace(\"'\", '').split(',')" - ] - }, - { - "cell_type": "markdown", - "id": "0dd65b93", - "metadata": {}, - "source": [ - "ARCHIVE TESTING " - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "c1dc70c3", - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2022-04-12 12:43:41,050 INFO: Creating index for ../../warcs_dir/origo-archive_new3.warc.gz...\n", - "2022-04-12 12:43:44,937 INFO: Index successfully created.\n" - ] - } - ], - "source": [ - "warc_filename = '../../warcs_dir/origo-archive_new3.warc.gz'\n", - "wa = WarcCachingDownloader(warc_filename, None, logger, just_cache=True, download_params={'stay_offline': True})" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "id": "b03d4480", - "metadata": {}, - "outputs": [], - "source": [ - "test_url='https://www.origo.hu/archiv/20040830rendezd.html'" - ] - }, - { - "cell_type": "code", - "execution_count": 25, - "id": "d7d7a836", - "metadata": {}, - "outputs": [], - "source": [ - "ARTICLE_ROOT_PARAMS_SPEC = [(('div',),{'class': 'col-xl-8'}),\n", - " (('div',), {'class': 'swiper-wrapper'}),\n", - " (('article',), {'id': 'article-center'}),\n", - " (('article',), {'id': 'article-text'}),\n", - " (('div',), {'id': 'cikk'}),\n", - " (('div',), {'class': 'article_text'}),\n", - " (('div',), {'id': 'article-text'}),\n", - " (('div',), {'id': {'kenyer-szov'}})\n", - " #(('div',), {'class': 'o-section-main'})\n", - " ]" - ] - }, - { - "cell_type": "markdown", - "id": "75db7679", - "metadata": {}, - "source": [ - "Link testing" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "id": "26641660", - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2022-04-12 23:58:33,041 INFO: Creating index for ../../warcs_dir/origo_root_problems.warc.gz...\n", - "2022-04-12 23:58:33,047 INFO: Index successfully created.\n" - ] - } - ], - "source": [ - "\n", - "warc_filename = '../../warcs_dir/origo_root_problems.warc.gz'\n", - "w = WarcCachingDownloader(warc_filename, None, logger, just_cache=True, download_params={'stay_offline': True})" - ] - }, - { - "cell_type": "code", - "execution_count": 42, - "id": "227cf085", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "https://www.origo.hu/itthon/valasztas2010/kampanynaplo/20100129-kilep-az-mdfbol-a-mosonmagyarovari-polgarmester.html\n" - ] - } - ], - "source": [ - "print(list(w.url_index)[3])\n", - "for f in ARTICLE_ROOT_PARAMS_SPEC:\n", - " if from_warc(w, list(w.url_index)[0]).find(f[0], f[1]) is not None:\n", - " print(f)" - ] - }, - { - "cell_type": "code", - "execution_count": 36, - "id": "0f8236ad", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "[

2022.02.25. péntek

]" - ] - }, - "execution_count": 36, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "from_warc(w, list(w.url_index)[1]).find_all('p')" - ] - }, - { - "cell_type": "code", - "execution_count": 43, - "id": "4c1824a8", - "metadata": {}, - "outputs": [], - "source": [ - "with open('20100129-kilep-az-mdfbol-a-mosonmagyarovari-polgarmester.html', 'w') as htmlfile:\n", - " htmlfile.write(str(from_warc(w, list(w.url_index)[3])))" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "id": "3304a108", - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2022-04-12 12:52:20,989 INFO: Creating index for ../../warcs_dir/origo-articles_new5.warc.gz...\n", - "2022-04-12 12:58:17,016 INFO: Index successfully created.\n" - ] - } - ], - "source": [ - "\n", - "warc_filename = '../../warcs_dir/origo-articles_new5.warc.gz'\n", - "w = WarcCachingDownloader(warc_filename, None, logger, just_cache=True, download_params={'stay_offline': True})" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "d3dd8fa1", - "metadata": {}, - "outputs": [], - "source": [ - "# Unique link list\n", - "uniques = set([u.split('/')[3] for u in w.url_index])\n", - "unique_dict = {u:None for u in uniques}\n", - "for l in w.url_index:\n", - " if unique_dict[l.split('/')[3]] == None:\n", - " unique_dict[l.split('/')[3]] = l" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "id": "2712dbf6", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'uzletinegyed': 'https://www.origo.hu/uzletinegyed/hirdetes/kavosz/20091218-akik-sikert-kovacsoltak-a-szechenyi-kartyabol.html',\n", - " 'gazdasag': 'https://www.origo.hu/gazdasag/hirek/20090908-mariann-fischer-boel-eu-fobiztos-szamara-irt-levelet-a.html',\n", - " 'nagyvilag': 'https://www.origo.hu/nagyvilag/20190328-hatosagi-felugyelet-ala-helyezhettek-romaniaban-laura-corduta-kovesit.html',\n", - " 'techbazis': 'https://www.origo.hu/techbazis/20180828-harom-uj-iphone-erkezik.html',\n", - " 'jog': 'https://www.origo.hu/jog/20090324-mi-a-teendo-katyukar-eseten.html',\n", - " 'idojaras': 'https://www.origo.hu/idojaras/20130226-elaztatja-az-eso-a-nyugatdunantult-vas-zala-20-millimeter-eso.html',\n", - " 'teve': 'https://www.origo.hu/teve/19981211mk.html',\n", - " 'palyabea': 'https://www.origo.hu/palyabea/post/20110103-szabad-asszociacio-egy-keprol.html',\n", - " 'tudomany': 'https://www.origo.hu/tudomany/20171020-szaz-eve-kezdodott-a-caporettoi-attores.html',\n", - " 'filmklub': 'https://www.origo.hu/filmklub/20041217megszuletett.html',\n", - " 'itthon': 'https://www.origo.hu/itthon/percrolpercre/20171023-orban-viktor-beszedet-eloben-kozvetitjuk.html',\n", - " 'tafelspicc': 'https://www.origo.hu/tafelspicc/20130719-szabadtuzon-barmit-a-bogracs-halaszle-gulyas-lebbencs-slambuc-ust.html',\n", - " 'auto': 'https://www.origo.hu/auto/20050421digitalis1.html',\n", - " 'nepszavazas-2008': 'https://www.origo.hu/nepszavazas-2008/blog/20080304-nepszavazasi-ertesitoket-egetett-el-egy-postas.html',\n", - " 'amerikai-elnokvalasztas-2008': 'https://www.origo.hu/amerikai-elnokvalasztas-2008/blog/kampany/20080213-hajszalnyi-elonye-van-hillary-clintonnak-es-barack-obama-elott-az.html',\n", - " 'sport': 'https://www.origo.hu/sport/laza/20200803-sportkozvetites-sportmusor.html',\n", - " 'programajanlo': 'https://www.origo.hu/programajanlo/blog/20080214-csajbuli-kilenceves-a-bladerunnaz.html'}" - ] - }, - "execution_count": 17, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "del unique_dict['archivum']\n", - "unique_dict" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "id": "b5e303b0", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'https://www.origo.hu/itthon/onkormanyzati-valasztas-2010/hirek/20100930-polgar-bunpartolassal-vadolja-az-ugyeszseg-az-mszp-s-polgarmestert.html'" - ] - }, - "execution_count": 15, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "[u for u in w.url_index if 'bunpartolassal-vadolja' in u][0]" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "id": "cd7d8d16", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'www.origo.hu/itthon/onkormanyzati-valasztas-2010/hirek/20100930-polgar-bunpartolassal-vadolja-az-ugyeszseg-az-mszp-s-polgarmestert.html'" - ] - }, - "execution_count": 16, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "root_problem" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "id": "c6a6f78d", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "defaultdict(.()>,\n", - " {'sch:url': 'https://www.origo.hu/itthon/onkormanyzati-valasztas-2010/hirek/20100930-polgar-bunpartolassal-vadolja-az-ugyeszseg-az-mszp-s-polgarmestert.html',\n", - " 'sch:name': 'Bűnpártolással vádol az ügyészség egy MSZP-s polgármestert',\n", - " 'sch:source': ['MTI'],\n", - " 'sch:datePublished': datetime.datetime(2010, 9, 30, 19, 24),\n", - " 'sch:dateModified': datetime.datetime(2010, 9, 30, 0, 0),\n", - " 'sch:keywords': ['hírek', 'önkormányzati választás 2010'],\n", - " 'sch:articleSection': 'Itthon'})" - ] - }, - "execution_count": 18, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "get_meta(logger, root_problem, from_warc(w, root_problem))" - ] - }, - { - "cell_type": "code", - "execution_count": 63, - "id": "49125a41", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "defaultdict(. at 0x7fc75a09d700>, {'sch:url': 'https://www.origo.hu/uzletinegyed/hirdetes/kavosz/20091218-akik-sikert-kovacsoltak-a-szechenyi-kartyabol.html', 'sch:name': 'Akik sikert kovácsoltak a Széchenyi kártyából', 'sch:authors': ['-'], 'sch:datePublished': datetime.datetime(2009, 12, 18, 8, 48), 'sch:dateModified': datetime.datetime(2009, 12, 18, 0, 0), 'sch:keywords': ['hirdetés'], 'sch:articleSection': 'Üzletinegyed'})\n", - "defaultdict(. at 0x7fc75a06ca60>, {'sch:url': 'https://www.origo.hu/gazdasag/hirek/20090908-mariann-fischer-boel-eu-fobiztos-szamara-irt-levelet-a.html', 'sch:name': 'Az EU-főbiztoshoz fordult a Magyar Agrárkamara', 'sch:source': ['MTI'], 'sch:datePublished': datetime.datetime(2009, 9, 8, 20, 10), 'sch:dateModified': datetime.datetime(2009, 9, 8, 0, 0), 'sch:keywords': ['agrárium', 'Magyar Agrárkamara', 'Mariann Fischer Boel', 'Európai Unió', 'hírek', 'agrárárak', 'EU', 'gabona'], 'sch:articleSection': 'Gazdaság'})\n", - "defaultdict(. at 0x7fc75a253d30>, {'sch:url': 'https://www.origo.hu/nagyvilag/20190328-hatosagi-felugyelet-ala-helyezhettek-romaniaban-laura-corduta-kovesit.html', 'sch:name': 'Meggyanúsították és hatósági felügyelet alá helyezték Codruta Kövesit Romániában', 'sch:source': ['MTI'], 'sch:datePublished': datetime.datetime(2019, 3, 28, 21, 22), 'sch:dateModified': datetime.datetime(2019, 3, 29, 0, 0), 'sch:keywords': [' Bukarest', 'Bukarest', 'Laura Codruta Kövesi', 'Románia', ' Románia', 'Nagyvilág'], 'sch:articleSection': 'Nagyvilág'})\n", - "defaultdict(. at 0x7fc75a138ca0>, {'sch:url': 'https://www.origo.hu/techbazis/20180828-harom-uj-iphone-erkezik.html', 'sch:name': 'Mindent kiteregettek az új iPhone-okról', 'sch:author': ['Origo'], 'sch:datePublished': datetime.datetime(2018, 8, 28, 19, 54), 'sch:dateModified': datetime.datetime(2018, 8, 28, 0, 0), 'sch:keywords': [' iOS', 'Apple', ' okostelefon', ' Apple', 'iOS', 'iPhone', 'Tech', 'okostelefon'], 'sch:articleSection': 'Tech'})\n", - "defaultdict(. at 0x7fc75ae32af0>, {'sch:url': 'https://www.origo.hu/jog/20090324-mi-a-teendo-katyukar-eseten.html', 'sch:name': 'Félreáll, fotóz, tanút keres, bejelent', 'sch:author': ['[origo]'], 'sch:datePublished': datetime.datetime(2009, 4, 6, 10, 29), 'sch:dateModified': datetime.datetime(2009, 4, 6, 0, 0), 'sch:keywords': ['jogi eljárás', ' Magyar Közút Kht.', 'jog', 'Magyar Közút Kht.', ' Magyar Autóklub', 'Magyar Autóklub', ' jog', 'Jog'], 'sch:articleSection': 'Jog'})\n", - "defaultdict(. at 0x7fc75ae32e50>, {'sch:url': 'https://www.origo.hu/idojaras/20130226-elaztatja-az-eso-a-nyugatdunantult-vas-zala-20-millimeter-eso.html', 'sch:name': 'Eláztatja az eső a Nyugat-Dunántúlt', 'sch:author': ['[origo]'], 'sch:datePublished': datetime.datetime(2013, 2, 26, 9, 0), 'sch:dateModified': datetime.datetime(2013, 2, 26, 0, 0), 'sch:keywords': [' Zala megye', ' Vas megye', 'Zala megye', 'csapadék', 'melegfront', ' melegfront', ' mediterrán ciklon', 'Vas megye', 'mediterrán ciklon'], 'sch:articleSection': 'Időjárás'})\n", - "defaultdict(. at 0x7fc75ae32700>, {'sch:url': 'https://www.origo.hu/teve/19981211mk.html', 'sch:name': 'Mortal Kombat', 'sch:author': ['[origo]'], 'sch:keywords': ['', 'Tévé'], 'sch:articleSection': 'Tévé'})\n", - "2011. január. 3.\n", - "defaultdict(. at 0x7fc75ae32790>, {'sch:url': 'https://www.origo.hu/palyabea/post/20110103-szabad-asszociacio-egy-keprol.html', 'sch:name': 'Szabad asszociáció', 'sch:datePublished': datetime.datetime(2011, 1, 3, 0, 0), 'sch:keywords': ['néni', 'Palya Bea', 'post', 'kép', 'asszociáció', 'Budapest'], 'sch:articleSection': 'Palya Bea'})\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2022-04-12 10:58:52,690 WARNING: https://www.origo.hu/nepszavazas-2008/blog/20080304-nepszavazasi-ertesitoket-egetett-el-egy-postas.html ARTICLE NAME NOT FOUND!\n", - "2022-04-12 10:58:52,690 WARNING: https://www.origo.hu/nepszavazas-2008/blog/20080304-nepszavazasi-ertesitoket-egetett-el-egy-postas.html ARTICLE NAME NOT FOUND!\n", - "2022-04-12 10:58:52,692 WARNING: https://www.origo.hu/nepszavazas-2008/blog/20080304-nepszavazasi-ertesitoket-egetett-el-egy-postas.html FAILED TO FIND PUBLICATION DATE TAG!\n", - "2022-04-12 10:58:52,692 WARNING: https://www.origo.hu/nepszavazas-2008/blog/20080304-nepszavazasi-ertesitoket-egetett-el-egy-postas.html FAILED TO FIND PUBLICATION DATE TAG!\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ - "defaultdict(. at 0x7fc75ae328b0>, {'sch:url': 'https://www.origo.hu/tudomany/20171020-szaz-eve-kezdodott-a-caporettoi-attores.html', 'sch:name': 'Rengeteg magyar adta életét egy haszontalan győzelemért', 'sch:author': ['Origo'], 'sch:datePublished': datetime.datetime(2017, 10, 20, 17, 8), 'sch:dateModified': datetime.datetime(2017, 10, 20, 0, 0), 'sch:keywords': [' évforduló', ' áttörés', 'történelem', 'évforduló', 'I. világháború', 'Olaszország', ' I. világháború', ' Isonzo-folyó', 'áttörés', 'Osztrák-Magyar Monarchia', 'Isonzo-folyó', ' Osztrák-Magyar Monarchia', 'Tudomány', ' történelem', 'világháború', ' Olaszország'], 'sch:articleSection': 'Tudomány'})\n", - "defaultdict(. at 0x7fc75a1dc310>, {'sch:url': 'https://www.origo.hu/filmklub/20041217megszuletett.html', 'sch:name': 'Megszületett Gollam diagnózisa', 'sch:author': ['[origo]'], 'sch:datePublished': datetime.datetime(2004, 12, 17, 15, 51), 'sch:dateModified': datetime.datetime(2004, 12, 22, 0, 0), 'sch:keywords': [' Gollam', 'Film', 'Gollam', 'A Gyűrűk Ura'], 'sch:articleSection': 'Film'})\n", - "defaultdict(. at 0x7fc75a1dc820>, {'sch:url': 'https://www.origo.hu/itthon/percrolpercre/20171023-orban-viktor-beszedet-eloben-kozvetitjuk.html', 'sch:name': 'A szabadságharcra emlékezik Orbán Viktor', 'sch:author': ['Kovács András'], 'sch:datePublished': datetime.datetime(2017, 10, 23, 15, 19), 'sch:dateModified': datetime.datetime(2017, 10, 23, 0, 0), 'sch:keywords': ['Terror Háza', 'percrőlpercre', ' Fidesz-KDNP', '1956-os forradalom', ' Orbán Viktor', 'Fidesz-KDNP', 'Itthon', ' Terror Háza', 'Orbán Viktor'], 'sch:articleSection': 'Itthon'})\n", - "defaultdict(. at 0x7fc75a1dc550>, {'sch:url': 'https://www.origo.hu/tafelspicc/20130719-szabadtuzon-barmit-a-bogracs-halaszle-gulyas-lebbencs-slambuc-ust.html', 'sch:name': 'Milyen bográcsban mi készül?', 'sch:author': ['Táfelspicc'], 'sch:datePublished': datetime.datetime(2013, 7, 22, 7, 59), 'sch:dateModified': datetime.datetime(2013, 7, 25, 0, 0), 'sch:keywords': ['halászlé', 'bogrács', 'gulyás', ' bográcsozás', ' bogrács', ' gulyás', 'slambuc', ' slambuc', ' bajai halászlé', 'bográcsozás', ' lebbencs', 'Táfelspicc', 'bajai halászlé', 'lebbencs'], 'sch:articleSection': 'Táfelspicc'})\n", - "defaultdict(. at 0x7fc75ae32c10>, {'sch:url': 'https://www.origo.hu/auto/20050421digitalis1.html', 'sch:name': 'Digitális kamerával a gyorshajtók ellen', 'sch:source': ['MTI'], 'sch:datePublished': datetime.datetime(2005, 4, 21, 12, 33), 'sch:dateModified': datetime.datetime(2005, 4, 21, 0, 0), 'sch:keywords': ['közlekedésbiztonság', ' kamera', ' közlekedésbiztonság', 'Autó', 'kamera', 'rendőrség'], 'sch:articleSection': 'Autó'})\n", - "defaultdict(. at 0x7fc75a138d30>, {'sch:url': 'https://www.origo.hu/nepszavazas-2008/blog/20080304-nepszavazasi-ertesitoket-egetett-el-egy-postas.html', 'sch:name': None, 'sch:keywords': ['blog'], 'sch:articleSection': 'népszavazás 2008'})\n", - "defaultdict(. at 0x7fc75a06c430>, {'sch:url': 'https://www.origo.hu/amerikai-elnokvalasztas-2008/blog/kampany/20080213-hajszalnyi-elonye-van-hillary-clintonnak-es-barack-obama-elott-az.html', 'sch:name': None, 'sch:keywords': ['blog'], 'sch:articleSection': 'amerikai elnökválasztás 2008'})\n", - "defaultdict(. at 0x7fc75ae32790>, {'sch:url': 'https://www.origo.hu/sport/laza/20200803-sportkozvetites-sportmusor.html', 'sch:name': 'Fókuszban az amerikai sportok hétfő este', 'sch:source': ['MTI'], 'sch:datePublished': datetime.datetime(2020, 8, 3, 8, 23), 'sch:dateModified': datetime.datetime(2020, 8, 3, 0, 0), 'sch:keywords': ['sportműsor', 'laza', 'sportközvetítés'], 'sch:articleSection': 'Sport'})\n", - "defaultdict(. at 0x7fc75a138d30>, {'sch:url': 'https://www.origo.hu/programajanlo/blog/20080214-csajbuli-kilenceves-a-bladerunnaz.html', 'sch:name': 'Csajbuli! - kilencéves a Bladerunnaz', 'sch:author': ['Dömötör Ági'], 'sch:datePublished': datetime.datetime(2008, 2, 14, 17, 34), 'sch:dateModified': datetime.datetime(2008, 2, 14, 0, 0), 'sch:keywords': [' Bladerunnaz', 'buli', 'Bladerunnaz', 'Kultúra', 'blog'], 'sch:articleSection': 'Kultúra'})\n" - ] - } - ], - "source": [ - "for v in unique_dict.values():\n", - " print(get_meta(logger, v, from_warc(w, v)))" - ] - }, - { - "cell_type": "code", - "execution_count": 20, - "id": "6db1ac05", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "
\n", - "\n", - "
\n", - "
\n", - "

Nézőpont Intézet: Orbánhoz vándorolnak Gyurcsány szimpatizánsai

\n", - "
\n", - "
\n", - "
MTI | Létrehozás dátuma: 2010. 02. 10., 23:23
eszközök:
\n", - "
\n", - "
\n", - "
\n", - "
Gyurcsány Ferenc szimpatizánsainak több mint negyede pártolt át Orbán Viktorhoz 2006 óta - áll a Nézőpont Intézet legfrissebb felmérésében. A közvélemény-kutatás szerint jelenleg az aktív szavazók fele a Fideszre szavazna, míg az MSZP-t csak 11 százalék választaná.
\n", - "
\n", - "
\n", - "
\"Forrás:

Gyurcsány rajongói szétszéledtek 2006 óta

\n", - "
\n", - "

Ajánlat

\n", - "\n", - "
\n", - "

OK.hu

\n", - "
\n", - "
\n", - "

A négy éve még Gyurcsány Ferenccel szimpatizáló szavazók 27 százaléka ma Orbán Viktorra, 17-17 százaléka Bokros Lajosra és Mesterházy Attilára, míg 5 százaléka Vona Gáborra szavazna - olvasható a Nézőpont Intézet friss felmérésében, amelyet szerdán hoztak nyilvánosságra.

\n", - "

Az intézet szerint Gyurcsány Ferenc volt szocialista miniszterelnökről az összes megkérdezett 40 százaléka még inkább pozitívan vélekedett 2006-ban. Ma a négy évvel ezelőtti Gyurcsány-tábornak csak 22 százaléka MSZP-szimpatizáns, 25 százaléka bizonytalan, 21 százaléka viszont a Fideszhez csatlakozott.

\n", - "

A kutatás adatai szerint Orbán Viktorra, a Fidesz miniszterelnök-jelöltjére az évértékelő beszéd után a szavazók 51 százaléka adná a voksát, míg Bokros Lajosra 10, Mesterházy Attilára 8 százaléknyian szavaznának. Vona Gábor, a Jobbik jelöltje 5 százalékot kapna.

\n", - "

A pártszimpátia szerint az aktív szavazók 51 százaléka szavazna \"most vasárnap\" a Fideszre, 11 százaléka az MSZP-re és 7 százaléka a Jobbikra. Az MDF-re az aktív szavazók 3 százaléka szavazna - tették hozzá.

\n", - "

A kutatást február 6. és 9. között készítették 1000 fő véletlenszerű megkérdezésével.

\n", - "
\n", - "
\n", - "
\n", - "
\n", - "
\n", - "
\n", - "
eszközök:
\n", - "
\n", - "
\n", - "
\n", - "
Megosztás - Mi ez?
\n", - "\n", - "
\n", - "
\n", - "
\n", - "
\n", - "
" - ] - }, - "execution_count": 20, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "from_request('https://www.origo.hu/itthon/valasztas2010/felmeresek/20100210-nezopont-intezet-orbanhoz-vandorolnak-gyurcsany-szimpatizansai.html').find('div', {'id': 'cikk'})" - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "id": "d709a09c", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "
\n", - "

Befutott McCain vízvezetékszerelője

Pethő András|2008. 10. 18., 12:46|
\n", - "
\n", - "
  • \n", - "
  • \n", - "
  • \n", - "
  • \n", - "
\n", - "
    \n", - "
  • \n", - "
  • \n", - "
  • \n", - "
  • \n", - "
\n", - "
\n", - "

Az amerikai elnökjelöltek közötti adóvita szimbólumává vált a szerda esti vitában sokszor emlegetett Joe, a vízvezetékszerelő, aki olyan népszerű lett, hogy most sorban állnak nála a nagy tévécsatornák. A férfi Barack Obamának panaszkodott egy kampánygyűlésen, amelynek nyomán felkapták a republikánusok. Kiderült azonban, hogy nem minden klappol a John McCain által emlegetett történetben.

\n", - "
\n", - "
\n", - "
\n", - "
\"Forrás:

Joe, a vízvezetékszerelő

\n", - "
\n", - "

Ajánlat

\n", - "\n", - "
\n", - "

Keresés

\n", - "
\n", - "
\n", - "

Az elnökjelöltek szerda esti vitájának volt egy visszatérő szereplője, Joe a vízvezetékszerelő. A republikánus John McCain említette először a nevét, amikor felidézte, hogy Obama egyik ohiói kampányrendezvényén egy Joe nevű vízvezetékszerelő beszélt arról, hogy meg akarja vásárolni a céget, amelynek dolgozik, de most gondolkodóba esett, mert a demokrata jelölt megválasztása esetén több adót kell majd fizetnie.

\n", - "

Ennek kapcsán aztán a két jelölt ismét elvitázott azon, hogy melyikük adópolitikája lendíthet nagyobbat a gyengélkedő gazdaságon. Közben a kamerába nézve többször közvetlenül is üzentek Joenak, aki egy nap leforgása alatt országos ismertségre tett szert. A férfi és Obama beszélgetéséről készült felvétel már a vita előtt is népszerű volt konzervatív weboldalakon, most azonban Joe már állandó eleme lett a republikánus kampánynak.

\n", - "

A népszerűségét annak köszönheti, hogy egy gyűlésen odalépett Obamához és közölte vele, meg akar vásárolni egy céget, amely évente 250-280 ezer dolláros bevételre tesz szert, majd feltette a kérdést: \"A maga adóprogramjával többet fogok fizetni, ugye?\" A demokrata elnökjelölt egyebek mellett azt válaszolta, hogy ha elosztják a vagyont, akkor az jó mindenkinek. A konzervatívok szerint ez lényegében azt jelenti, hogy Obama szocialista politikát akar folytatni.

\n", - "

Egy nappal a vita után kiderült azonban, hogy nem teljesen pontos az, amit McCain mondott. A férfi első keresztneve például nem is Joe, hanem Samuel (teljes neve Samuel J. Wurzelbacher), és valójában nem is vízvezetékszerelő, legalábbis nem rendelkezik olyan engedéllyel, amely szükséges ehhez a tevékenységhez Ohio államban. Valóban dolgozik azonban egy vízvezetékszereléssel foglalkozó cégnél, de mivel csak két főállású dolgozója van - a tulajdonos és Wurzelbacher -, és anyagi helyzetéről keveset tudni, így nem egyértelmű, hogy valóban adóemelésre számíthatna-e Obama győzelme esetén.

\n", - "

A demokrata elnökjelölt adócsökkentést ígér azoknak a családoknak és cégeknek, amelyek jövedelme 250 ezer dollár alatt van, felette azonban növelné a közterheket. Samuel J. Wurzelbacher a CBS televíziónak nyilatkozva azt mondta, az rémiszti meg Obama tervében, hogy miként lehet meghúzni egy határt, amely eldönti, ki fizet többet és kevesebbet. \"Mikor fogja eldönteni, hogy százezer dollár is soknak számít?\" - tette fel a kérdést a férfi, akiről csütörtökön kiderült, hogy 1200 dolláros adótartozása van, bár egy hatósági szóvivő szerint lehetséges, hogy nem az ő hibája, mert elképzelhető, hogy nem is tudott róla.

\n", - "

Bár John McCain az egyik esti talkshowban bocsánatot kért Wurzelbachertől, amiért neki köszönhetően rászabadult a teljes amerikai média, csütörtökön több rendezvényen is emlegette őt. Például egy jótékonysági rendezvényen, ahol Obamával együtt vett részt. Ezúttal nem vitáztak, ez ugyanis egy hagyományos politikai vacsora Al Smith egykori New York-i kormányzó emlékére, amelyen az elnökjelöltek rendszerint vicces beszédet mondanak. A szerda esti vitához képest sokkal felszabadultabb McCain egyik poénja például az volt, hogy igaz a hír, kirúgta teljes kampánystábját és felvette helyettük Joet, a vízvezetékszerelőt.

\n", - "

Chicago, Illinois - Egyesült Államok

\n", - "
\n", - "
\n", - "
\n", - "
\n", - "
\n", - "
\n", - "
\n", - "
  • \n", - "
  • \n", - "
  • \n", - "
\n", - "
    \n", - "
  • \n", - "
  • \n", - "
\n", - "
\n", - "
" - ] - }, - "execution_count": 21, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "from_request('https://www.origo.hu/amerikai-elnokvalasztas-2008/blog/kampany/20081017-joe-a-vizvezetekszerelo-es-john-mccain-es-barack-obama-adopolitikaja.html').find('div', {'id': 'cikk'})" - ] - }, - { - "cell_type": "markdown", - "id": "88c5f9c4", - "metadata": {}, - "source": [ - "KNOWN BAD and BLACKLISTED link testing" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "id": "f626078a", - "metadata": {}, - "outputs": [], - "source": [ - "with open('origo_BLACKLIST.txt', 'r') as infile:\n", - " blacklisted = infile.read().splitlines()" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "id": "cad53acb", - "metadata": {}, - "outputs": [], - "source": [ - "for b in w.url_index:\n", - " if '' in b and b not in blacklisted:\n", - " print(b)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "18524216", - "metadata": {}, - "outputs": [], - "source": [ - "with open('known_bad_urls.txt', 'r') as infile:\n", - " known_bad = infile.read().splitlines() \n", - "not_bad = []\n", - "in_word = []\n", - "for link in known_bad:\n", - " if 'archiv' in link:\n", - " link = link.replace('/archiv/', '/teve/')\n", - "\n", - " soup = BeautifulSoup(requests.get(link).text, 'html.parser')\n", - " if soup.find('div', {'class': 'nwm-404'}) is not None:\n", - " print(link)\n", - " not_bad.append(link)\n", - "\n", - " i1 = link.find('-')\n", - " i2 = link[i1:].find('-')\n", - " find_word = link[i1:i1+i2]\n", - " if find_word not in soup.get_text():\n", - " in_word.append(link)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 57, - "id": "7e72cac6", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "https://www.origo.hu/teve/20020812adallas.xml.html\n" - ] - } - ], - "source": [ - "not_tv = []\n", - "for link in blacklisted:\n", - " link = link.replace('/archivum/', '/teve/')\n", - "\n", - " soup = BeautifulSoup(requests.get(link).text, 'html.parser')\n", - " if soup.find('div', {'class': 'nwm-404'}) is not None:\n", - " print(link)\n", - " not_tv.append(link)\n" - ] - }, - { - "cell_type": "code", - "execution_count": 59, - "id": "3b2e1f46", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'https://www.origo.hu/archivum/20131022-kilencmilliot-vittek-el-gundel-takacs-musorabol.html'" - ] - }, - "execution_count": 59, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "blacklisted[0]" - ] - }, - { - "cell_type": "code", - "execution_count": 60, - "id": "32824911", - "metadata": {}, - "outputs": [], - "source": [ - "not_tv_2 = []\n", - "for link in blacklisted:\n", - " link = link.replace('/archivum/', '/teve/')\n", - "\n", - " soup = BeautifulSoup(requests.get(link).text, 'html.parser')\n", - "known_bad_list\n" - ] - }, - { - "cell_type": "markdown", - "id": "d92d280c", - "metadata": {}, - "source": [ - "writing out dictionary python file" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "id": "b158f79c", - "metadata": {}, - "outputs": [], - "source": [ - "with open('origo_usable_urls.tsv', 'r') as tsvin, open('origo_usable_links_dict.txt', 'w') as txtout:\n", - " link_dict = {c.split('\\t')[1]:c.split('\\t')[2] for c in tsvin.read().splitlines()}\n", - " print('ORIGO_URL_CHANGES =\\n', file=txtout)\n", - " print(str(link_dict), file=txtout)\n", - "\n", - "\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "99daf7f4", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "{'a': 'MISI', 'b': 'FERI'}\n" - ] - } - ], - "source": [ - "a = {'a': 'MISI', \n", - "'b': 'FERI'}\n", - "print(str(a))" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "b6aa5920", - "metadata": {}, - "outputs": [], - "source": [ - "with open('dummy.txt', 'w') as dummy:\n", - " dummy.write(str(a))" - ] - }, - { - "cell_type": "markdown", - "id": "8ccc6225", - "metadata": {}, - "source": [ - "Check palyabea" - ] - }, - { - "cell_type": "code", - "execution_count": 25, - "id": "3c413bc0", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "[Lamm Dávid,\n", - " Barcza Horváth János,\n", - " Palya Bea,\n", - " Dés András,\n", - " Budapest,\n", - " koncert,\n", - " próba]" - ] - }, - "execution_count": 25, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "from_request(palyabea).find('body', {'id':'!BODY_ID'}).find('div', {'id':'left'}).find_all('a', {'href':True, 'title':True, 'class':False})" - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "id": "94cfe76d", - "metadata": {}, - "outputs": [], - "source": [ - "pubdate = from_request(palyabea).find('body', {'id':'!BODY_ID'}).find('div', {'class': 'date'})\n", - "parse_date(pubdate.get_text(strip=True), \"%Y. %B. %e.\")" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "id": "af800615", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "4 https://www.origo.hu/sport/kozvetites/20211202-kezilabda-noi-vilagbajnoksag-magyarorszag-szlovakia-elo-kozvetites.html\n", - "3 https://www.origo.hu/sport/olimpia/galeria/20210726-gordeszka-latvanyos-kepek.html\n", - "1 https://www.origo.hu/auto/20180523-maris-kitiltjak-a-regi-dizelautokat-egy-nemet-varosbol.html\n", - "1 https://www.origo.hu/techbazis/20080321-bittorrentes-rivalist-kap-az-apple-tv.html\n", - "2 https://www.origo.hu/sport/futball/20220315-ronaldo-ismet-bizonyithat-kedvenc-ellenfele-ellen-otthon-juthat-tovabb-a-bl-titkos-eselyese.html\n", - "3 https://www.origo.hu/sport/galeria/20220317-a-szexi-luisinha-barosa-oliveira-mclaren-lando-norris-kepek-fotok-galeria.html\n", - "1 https://www.origo.hu/auto/20150904-telekocsi-migrans-mav-vonat.html\n", - "2 https://www.origo.hu/gazdasag/hirek/20091207-csokkenessel-nyitottak-a-new-yorki-tozsdek.html\n", - "2 https://www.origo.hu/gazdasag/hirek/20001011torlend1.html\n", - "5 https://www.origo.hu/itthon/valasztas2010/20100210-ujabb-feltort-levelszekrenyek-utan-nyomoz-a-rendorseg.html\n", - "6 https://www.origo.hu/palyabea/post/20100909-elso-proba-a-nagykoncertre.html\n" - ] - } - ], - "source": [ - "# format 1 bs.find('header', class_='article-head')\n", - "# format 2 bs.find('header', {'id': 'article-head'})\n", - "# format 3 bs.find('body', {'class': 'gallery'})\n", - "# format 4 bs.find('div', class_='sportonline_header')\n", - "# format 5 bs.find('div', {'id': 'cikk'})\n", - "for c, l in enumerate(link_list):\n", - " bs = from_request(l)\n", - " if bs.find('header', class_='article-head') is not None: print(1, l)\n", - " if bs.find('header', {'id': 'article-head'}) is not None: print(2, l)\n", - " if bs.find('body', {'class': 'gallery'}) is not None: print(3, l)\n", - " if bs.find('div', class_='sportonline_header') is not None: print(4, l)\n", - " if bs.find('div', {'id': 'cikk'}) is not None: print(5, l)\n", - " if bs.find('body', {'id':'!BODY_ID'}) is not None: print(6, l)" - ] - }, - { - "cell_type": "markdown", - "id": "50cc5c8f", - "metadata": {}, - "source": [ - "Meta json" - ] - }, - { - "cell_type": "code", - "execution_count": 26, - "id": "4beb014e", - "metadata": {}, - "outputs": [], - "source": [ - "a = [1,2,3,4,5]" - ] - }, - { - "cell_type": "code", - "execution_count": 30, - "id": "3a8bc01a", - "metadata": {}, - "outputs": [], - "source": [ - "if len(a) >= 5+1 and a[5] > 2:\n", - " print('he')" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.8.10" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/configs/origo/origo_notext_tags_normal.tsv b/configs/origo/origo_notext_tags_normal.tsv index 4029c49..aa18f4f 100644 --- a/configs/origo/origo_notext_tags_normal.tsv +++ b/configs/origo/origo_notext_tags_normal.tsv @@ -1,169 +1,231 @@ frequency tag average_word_count average_descendant_num immediate_texts_average_length URL_example hivatkozas preserved_attribute -173488
0 0 0 https://www.origo.hu/sport/eb/2012/20120524-a-modellkent-dolgozo-monika-pietrasinska-lesz-a-focieb-haziasszonya.html https://www.origo.hu/sport/20151130-sportmusor-11-30.html https://www.origo.hu/sport/csapat/20170605-kezilabda-bl-final-four-donto-utani-nyilatkozatok.html https://www.origo.hu/sport/futball/20180205-fc-barcelona-gerard-pique-espanyol-valencia-chelsea-serules.html https://www.origo.hu/sport/loero/20171109-gyorsasagi-motoros-vb-futam-magyar-nagydij-lehet.html null default -1453630
0 0 0 https://www.origo.hu/itthon/20150305-lazar-janosnak-elege-lett-a-botranyokbol.html https://www.origo.hu/auto/20040910konnyebb.html https://www.origo.hu/itthon/20040203feloldjak.html https://www.origo.hu/itthon/20021007menekulthullam.html https://www.origo.hu/sport/egyeni/20180203-verraszto-david-uszas-golden-tour-nizza-aranyerem.html decompose default -1265369
0 0 0 https://www.origo.hu/teve/20080410-recept-paradicsomos-lencse-ragu.html https://www.origo.hu/sport/trashtalk/20040420nhlkiesett.html https://www.origo.hu/sport/20180409-sportkozvetites-aprilis-9-hetfo.html https://www.origo.hu/sport/20070302nemertek.html https://www.origo.hu/sport/egyeni/20120625-babos-gyozott-a-wimbledoni-nyitonapon.html null default -174111
0 1.15E-05 0 https://www.origo.hu/sport/trashtalk/20211206-vezetoedzojet-es-foigazgatojat-is-kirugta-a-gyenge-szezonrajt-miatt-az-nhlcsapat.html https://www.origo.hu/sport/csapat/20210118-kezilabda-kezivb-orosz-sved-francia-es-portugal-csoportgyozelem.html https://www.origo.hu/sport/egyeni/20170923-teli-olimpia-phjongcshang-2018-dontest-hozott-az-egyesult-allamok.html https://www.origo.hu/sport/futball/20170401-kikapott-a-magyar-futsalvalogatott.html https://www.origo.hu/sport/csapat/19991110gyozelem.html decompose default -172875 0 1 0 https://www.origo.hu/sport/futball/20111121-david-beckham-sorrel-es-fiaival-unnepelte-a-bajnoki-cimet-a.html https://www.origo.hu/sport/egyeni/20170914-rapport-richard-sakk-vilagkupa-nyolcaddonto.html https://www.origo.hu/sport/futball/20110124-ismet-vilagvalogatottban-az-amator-kapus.html https://www.origo.hu/sport/futball/20080121-szalma-pal-az-ujpestben-ved-tovabb.html https://www.origo.hu/sport/futball/20210208-labdarugas-folytatodik-a-magyar-kupa-osszejohet-az-ujabb-fradifeharvar-focicsata.html null default -172875 0 0 0 https://www.origo.hu/sport/csapat/20190407-a-vasas-az-elso-dontos-a-noi-roplabdabajnoksagban-extraliga.html https://www.origo.hu/sport/20160716-minden-programot-toroltek-a-red-bull-air-race-budapesti-versenyhetvegejenek-szombati-napjan.html https://www.origo.hu/sport/futball/20130201-tottiekat-42re-megvertek-romaban.html https://www.origo.hu/sport/egyeni/20170430-poor-brigitta-ezustermes-a-gorog-tereptriatlon-vilagkupan.html https://www.origo.hu/sport/eb/2016/20160711-cristiano-ronaldo-szerint-ez-a-kupa-minden-bevandorloe.html null default -173713
0 0 0 https://www.origo.hu/sport/trashtalk/20211008-george-peterson-testepites-mr-olimpia-arnold-classic.html https://www.origo.hu/sport/futball/20210223-legendas-brazil-zseni-pele-politikai-rezsim-vilagbajnoksag-onetrajzi-film-netflix.html https://www.origo.hu/sport/trashtalk/2003121513pontos.html https://www.origo.hu/sport/csapat/20171120-kosarlabda-lengyelorszag-fiatal-magyar-csapat-jatszik-a-ferfi-kosarlabda-vb-selejtezon.html https://www.origo.hu/sport/futball/20190321-szlovakia-magyarorszag-labdarugo-eb-selejtezo-kezdocsapat.html decompose default -173831