<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://lms.onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=Python%3A_browse-url.py</id>
	<title>Python: browse-url.py - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://lms.onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=Python%3A_browse-url.py"/>
	<link rel="alternate" type="text/html" href="https://lms.onnocenter.or.id/wiki/index.php?title=Python:_browse-url.py&amp;action=history"/>
	<updated>2026-04-28T15:45:33Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://lms.onnocenter.or.id/wiki/index.php?title=Python:_browse-url.py&amp;diff=46927&amp;oldid=prev</id>
		<title>Onnowpurbo: Created page with &quot; from selenium import webdriver  import sys, getopt  import argparse    firefox_profile = webdriver.FirefoxProfile()  firefox_profile.set_preference(&#039;permissions.default.image...&quot;</title>
		<link rel="alternate" type="text/html" href="https://lms.onnocenter.or.id/wiki/index.php?title=Python:_browse-url.py&amp;diff=46927&amp;oldid=prev"/>
		<updated>2017-02-05T22:25:05Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; from selenium import webdriver  import sys, getopt  import argparse    firefox_profile = webdriver.FirefoxProfile()  firefox_profile.set_preference(&amp;#039;permissions.default.image...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt; from selenium import webdriver&lt;br /&gt;
 import sys, getopt&lt;br /&gt;
 import argparse&lt;br /&gt;
 &lt;br /&gt;
 firefox_profile = webdriver.FirefoxProfile()&lt;br /&gt;
 firefox_profile.set_preference(&amp;#039;permissions.default.image&amp;#039;, 2)&lt;br /&gt;
 firefox_profile.set_preference(&amp;#039;dom.ipc.plugins.enabled.libflashplayer.so&amp;#039;, &amp;#039;false&amp;#039;)&lt;br /&gt;
 driver = webdriver.Firefox(firefox_profile=firefox_profile)&lt;br /&gt;
 &lt;br /&gt;
 def parse_args():&lt;br /&gt;
     parser = argparse.ArgumentParser()&lt;br /&gt;
     parser.add_argument(&amp;#039;-i&amp;#039;, &amp;#039;--infile&amp;#039;, default=&amp;#039;&amp;#039;, help=&amp;#039;input filename&amp;#039;)&lt;br /&gt;
     parser.add_argument(&amp;#039;-o&amp;#039;, &amp;#039;--outfile&amp;#039;, default=&amp;#039;&amp;#039;, help=&amp;#039;output filename&amp;#039;)&lt;br /&gt;
     return parser.parse_args()&lt;br /&gt;
 &lt;br /&gt;
 def main():&lt;br /&gt;
     args = parse_args()&lt;br /&gt;
     outfile = args.outfile&lt;br /&gt;
     infile = args.infile &lt;br /&gt;
 &lt;br /&gt;
     with open(infile) as f:&lt;br /&gt;
         content = f.read().splitlines()&lt;br /&gt;
     f.close()&lt;br /&gt;
 &lt;br /&gt;
     f = open(outfile,&amp;quot;w&amp;quot;)&lt;br /&gt;
     for u in content:&lt;br /&gt;
         driver.get(u)&lt;br /&gt;
         elems = driver.find_element_by_tag_name(&amp;#039;body&amp;#039;).text&lt;br /&gt;
         f.write( elems.encode(&amp;#039;ascii&amp;#039;, &amp;#039;ignore&amp;#039;).decode(&amp;#039;ascii&amp;#039;) )&lt;br /&gt;
     driver.close()&lt;br /&gt;
     f.close()&lt;br /&gt;
 &lt;br /&gt;
     f = open(outfile,&amp;quot;r&amp;quot;)&lt;br /&gt;
     lines = f.readlines()&lt;br /&gt;
     f.close()&lt;br /&gt;
 &lt;br /&gt;
     f = open(outfile,&amp;quot;w&amp;quot;)&lt;br /&gt;
     for line in lines:&lt;br /&gt;
       if len(line.split())&amp;gt;5:&lt;br /&gt;
          f.write(line)&lt;br /&gt;
     f.close()&lt;br /&gt;
 &lt;br /&gt;
 main()&lt;/div&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
</feed>