code
import requests
url = (Set URL)
r = requests.get(url)
#print(r.text)
<!DOCTYPE html>
<html class="client-nojs" lang="ja" dir="ltr">
<head>
<meta charset="UTF-8"/>
<title>Japan- Wikipedia</title>
<script>document.documentElement.className="client-js";RLCONF={"wgBreakFrames":!1,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"ja","wgMonthNames":["","January","February","March","April","May","June","July",
"August","September","October","November","December"],"wgRequestId":"f8d48c18-541d-4c28-b21d-14bc30c6cdc4","wgCSPNonce":!1,"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":!1,"wgNamespaceNumber":0,"wgPageName":"Japan","wgTitle":"Japan","wgCurRevisionId":
79582646,"wgRevisionId":79582646,"wgArticleId":1864744,"wgIsArticle":!0,"wgIsRedirect":!1,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Page with reference error","Webarchive template archiveis link","Webarch
ive template wayback link","Articles with broken external links/January 2010-April","Articles with broken external links/February 2020",
"Articles with broken external links/March 2018","Articles with source template call error","Pages using ISBN magic links","Page with 3 columns specified in Div col","Articles with descriptions that require a source/May 2016","Items with a section that is about to be written
","Articles with muddy words(When)/2011","Page with 3 columns specified in Reflist","Page with graph","Japan","Island country","Existing sovereign country","G8 member countries"],"wgPageContentLanguage":"ja","wgPageContentModel":"wikitext","wgRelevantPageName":"Japan","wgRe
levantArticleId":1864744,"wgIsProbablyEditable":!1,"wgRelevantPageIsProbablyEditable":!1,"wgRestrictionEdit":["autoconfirmed"],"wgRestrictionMove":["autoconfirmed"],"wgMediaViewerOnClick":!0,"wgMediaViewerEnabledByDefault":!0,"wgPopupsRef
erencePreviews":!1,"wgPopupsConflictsWithNavPopupGadget":!1,"wgVisualEditor":{"pageLanguageCode":"ja",
"pageLanguageDir":"ltr","pageVariantFallbacks":"ja"},"wgMFDisplayWikibaseDescriptions":{"search":!0,"nearby":!0,"watchlist":!0,"tagline":!0},"wgWMESchemaEditAttemptStepOversample":!1,"wgULSCurrentAutonym":"Japanese","wgNoticeProject":"wikip
edia","wgCentralAuthMobileDomain":!1,"wgEditSubmitButtonLabelPublish":!0,"wgULSPosition":"interlanguage","wgWikibaseItemId":"Q17"};RLSTATE={"ext.globalCssJs.user.styles":"ready","site.styles":"ready","noscript":"ready","user.styles":"read
y","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.cite.styles":"ready","mediawiki.page.gallery.styles":"ready","ext.tmh.thumbnail.styles":"ready","ext.graph.styles":"ready","skins.vector.styles.legacy":"ready"
,"jquery.tablesorter.styles":"ready","mediawiki.toc.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","ext.wikimediaBadges":"ready","wikibase.client.init":"ready"};RLPAGEMODULES=["ext
.cite.ux-enhancements",
...
Recommended Posts