Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 14185

scraping url results in "Loading..." content

$
0
0

I am trying to read a url in python 3.8 but the html content only shows something ending in "Loading..."

from urllib.request import urlopenlink='https://opencorporates.com/companies/us_fl/P97000018463'page = urlopen(link)html_bytes = page.read()html = html_bytes.decode("utf-8")html

results in

'<html><head><script type="text/javascript"><!--\nfunction leastFactor(n) {\n if (isNaN(n) || !isFinite(n)) return NaN;\n if (typeof phantom !== \'undefined\') return \'phantom\';\n if (typeof module !== \'undefined\'&& module.exports) return \'node\';\n if (n==0) return 0;\n if (n%1 || n*n<2) return 1;\n if (n%2==0) return 2;\n if (n%3==0) return 3;\n if (n%5==0) return 5;\n var m=Math.sqrt(n);\n for (var i=7;i<=m;i+=30) {\n  if (n%i==0)      return i;\n  if (n%(i+4)==0)  return i+4;\n  if (n%(i+6)==0)  return i+6;\n  if (n%(i+10)==0) return i+10;\n  if (n%(i+12)==0) return i+12;\n  if (n%(i+16)==0) return i+16;\n  if (n%(i+22)==0) return i+22;\n  if (n%(i+24)==0) return i+24;\n }\n return n;\n}\nfunction go() {\n var p=1654161720790; var s=2297856402; var n;\nif ((s >> 15) & 1)\tp+=\n120411494*\t16;/*\np+= */else /* 120886108*\n*/p-=\t5952163*\t16;\tif ((s >> 1) & 1)\np+=185622079*\n2;/*\np+= */else \np-=/* 120886108*\n*/222069557*\t2; if ((s >> 12) & 1)/*\n*13;\n*/p+=/* 120886108*\n*/2437023*\t15;/*\np+= */else /*\np+= */p-=\n111288784*/*\nelse p-=\n*/13;\nif ((s >> 7) & 1)/*\np+= */p+=77307883*/*\n*13;\n*/8;\nelse /*\np+= */p-=\t86418547* 8;if ((s >> 9) & 1)\np+=/* 120886108*\n*/175293250* 10;\nelse \np-=57423209*/*\nelse p-=\n*/10; p-=2320115331;\n n=leastFactor(p);\n{ document.cookie="KEY="+n+"*"+p/n+":"+s+":3577604866:1;path=/;";\n  document.location.reload(true); }\n}\n//--></script></head>\n<body onload="go()">\nLoading...\n</body>\n</html>\n'

Is there a way to read the actual webpage content in python?


Viewing all articles
Browse latest Browse all 14185

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>