質問編集履歴

2

変更

2020/01/28 05:12

投稿

chgrios
chgrios

スコア70

test CHANGED
File without changes
test CHANGED
@@ -6,13 +6,15 @@
6
6
 
7
7
  soup2 = BeautifulSoup(html2,'html.parser')
8
8
 
9
+ print(soup2)
10
+
9
11
  ```
10
12
 
11
13
 
12
14
 
13
- このようなpythonコードで抽出したHTMLソースコードが実際ののソースの中身と違っていました。
15
+ このようなpythonコードで抽出したHTMLソースコード(print(soup2)部分)「該当URLをブラウザで開いてsave as で保存したソースと違っていました。
14
16
 
15
- どのようにしたら本家のソースコードを抽出できますか?
17
+ どのようにしたら「該当URLをブラウザで開いてsave as で保存したソースを抽出できますか?
16
18
 
17
19
 
18
20
 

1

変更

2020/01/28 05:12

投稿

chgrios
chgrios

スコア70

test CHANGED
File without changes
test CHANGED
@@ -20,4 +20,20 @@
20
20
 
21
21
  抽出したが中身は違っていたソースコード↓
22
22
 
23
+ ```html
24
+
25
+ <!DOCTYPE doctype html>
26
+
27
+ <html lang="en"><head><meta charset="utf-8"/><link href="/favicon.ico" rel="shortcut icon"/><meta content="width=device-width,initial-scale=1,shrink-to-fit=no" name="viewport"/><meta content="#000000" name="theme-color"/><link href="/manifest.json" rel="manifest"/><title>TFTACTICS.GG - Teamfight Tactics Database, Item Builder, Team Builder</title><script>!function(t,a){if(function(e){"string"==typeof e&&(e=[e]);for(var n=0;n<e.length;n++)a.cookie=e[n]+"=;max-age=-1;domain=."+a.domain+";path=/"}(["euconsent","eupubconsent","googlepersonalization"]),!t.__cmp){t.__cmp=function(){(t.attachEvent||t.addEventListener)("message",function(e){t.__cmp.receiveMessage(e)},!1),function e(){if(!t.frames.__cmpLocator)if(a.body){var n=a.createElement("iframe");n.style.display="none",n.name="__cmpLocator",a.body.appendChild(n)}else setTimeout(e,5)}();var o=[],e=function(e,n,a){"ping"===e?a&&a({gdprAppliesGlobally:!!(t.__cmp&&t.__cmp.config&&t.__cmp.config.storeConsentGlobally),cmpLoaded:!1}):o.push({command:e,parameter:n,callback:a})};return e.commandQueue=o,e.receiveMessage=function(e){var n=e&&e.data&&e.data.__cmpCall;n&&o.push({callId:n.callId,command:n.command,parameter:n.parameter,event:e})},e.config=t.cmpConfig||{globalVendorListLocation:"https://cmp.network-n.com/vendorlist.json"},e}();var e=a.createElement("script");e.async=!0,e.src="https://cmp.network-n.com/js/cmp.complete.bundle.js",a.getElementsByTagName("head")[0].appendChild(e)}}(window,document)</script><script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-61167242-4"></script><script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","UA-61167242-6")</script><script>!function(o,n){function t(){var o,c,e;_localCS.loaded||(_comscore.push({c1:"2",c2:"25110922",cs_ucfr:_localCS.consent}),c=(o=n).createElement("script"),e=o.getElementsByTagName("script")[0],c.async=!0,c.src=("https:"==o.location.protocol?"https://sb":"http://b")+".scorecardresearch.com/beacon.js",e.parentNode.insertBefore(c,e),_localCS.loaded=!0)}o._localCS={consent:null,loaded:!1,tx:null},o._comscore=o._comscore||[],o.__cmp&&(o.__cmp("getVendorConsents",[77],function(o,c){function e(o){return"object"==typeof o}c&&(_localCS.consent=e(o)&&e(o.vendorConsents)&&o.vendorConsents[77],_localCS.consent=_localCS.consent?"1":"0",t())}),function c(){o.__cmp("ping",null,function(o){if(!1===o.cmpLoaded){if(null===_localCS.tx)return void(_localCS.tx=setTimeout(c,3e3));t()}o.cmpLoaded&&(clearTimeout(_localCS.tx),t())})}()),o.__cmp||t()}(window,document)</script><noscript><img src="https://sb.scorecardresearch.com/p?c1=2&amp;c2=25110922&amp;cv=2.0&amp;cj=1"/></noscript><script src="/tftactics.min.js"></script><script async="" src="//tag.escalated.io?i=dnBYRYjwu3atX"></script><link href="/static/css/2.88f38d9b.chunk.css" rel="stylesheet"/><link href="/static/css/main.5a3d682d.chunk.css" rel="stylesheet"/></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(f){function e(e){for(var r,t,n=e[0],o=e[1],u=e[2],l=0,a=[];l<n.length;l++)t=n[l],Object.prototype.hasOwnProperty.call(c,t)&&c[t]&&a.push(c[t][0]),c[t]=0;for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(f[r]=o[r]);for(s&&s(e);a.length;)a.shift()();return p.push.apply(p,u||[]),i()}function i(){for(var e,r=0;r<p.length;r++){for(var t=p[r],n=!0,o=1;o<t.length;o++){var u=t[o];0!==c[u]&&(n=!1)}n&&(p.splice(r--,1),e=l(l.s=t[0]))}return e}var t={},c={1:0},p=[];function l(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return f[e].call(r.exports,r,r.exports,l),r.l=!0,r.exports}l.m=f,l.c=t,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(r,e){if(1&e&&(r=l(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var n in r)l.d(t,n,function(e){return r[e]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var r=this.webpackJsonpwestmarch=this.webpackJsonpwestmarch||[],n=r.push.bind(r);r.push=e,r=r.slice();for(var o=0;o<r.length;o++)e(r[o]);var s=n;i()}([])</script><script src="/static/js/2.da7cb3d7.chunk.js"></script><script src="/static/js/main.7fe4104d.chunk.js"></script></body></html>
28
+
29
+ ```
30
+
31
+
32
+
33
+
34
+
35
+ 本家のurl↓
36
+
37
+
38
+
23
39
  https://tftactics.gg/champions/aatrox