Browse Source

Made some new comments on the script

master
Jonas Leder 5 months ago
parent
commit
4d4d33e146
6 changed files with 60 additions and 4 deletions
  1. BIN
      Linkliste.xlsx
  2. BIN
      Websites/google.png
  3. BIN
      Websites/homepage.png
  4. BIN
      Websites/xxx.png
  5. 7
    3
      cloner.py
  6. 53
    1
      geckodriver.log

BIN
Linkliste.xlsx View File


BIN
Websites/google.png View File


BIN
Websites/homepage.png View File


BIN
Websites/xxx.png View File


+ 7
- 3
cloner.py View File

@@ -1,3 +1,4 @@
1
+#!/usr/bin/env python3
1 2
 from selenium import webdriver #Control libryry for Firefox
2 3
 from selenium.webdriver.firefox.options import Options #Options library for firefox
3 4
 from openpyxl import load_workbook #library for reading excel tables
@@ -8,13 +9,14 @@ runfirefoxheadless = False #set True to disable the Firefox GUI
8 9
 filename = "Linkliste.xlsx" #excel File which includes the link (example design is at the bottom. Starts reading from line 2)
9 10
 sheetname = "Linkliste" #name of the Sheet in the Excel file
10 11
 adblockplusfilename = "adblock.zip" #adblockplus file must be located in the Script Folder.
11
-adblockplusdownloadlink = "https://nextcloud.jonasled.de/index.php/s/xQWLPxzFYwWEFE2/download" #Downloadlink if ABP was not found
12
+adblockplusdownloadlink = "https://nextcloud.jonasled.de/index.php/s/xQWLPxzFYwWEFE2/download" #Downloadlink if ABP was not found. This is a modified version, which won't show the Welcome message.
12 13
 
13 14
 if(os.name == "nt"): #On Windows use \ to seperate Folders and on Linux /.
14 15
     abp_path = os.path.dirname(sys.argv[0]) + "\\" + adblockplusfilename
15 16
 else:
16 17
     abp_path = os.path.dirname(sys.argv[0]) + "/" + adblockplusfilename
17
-if not (os.path.exists(abp_path)):
18
+
19
+if not (os.path.exists(abp_path)): #Check if the ABP Plugin exists. If not it will download it
18 20
     print("Adblock Plus not found, downloading")
19 21
     import requests
20 22
     r = requests.get(adblockplusdownloadlink)
@@ -40,7 +42,7 @@ while True:
40 42
         print("Getting " + sheet_ranges['B' + str(row)].value)
41 43
         driver.set_window_size(1080, 100)
42 44
 
43
-        if(str(sheet_ranges['B' + str(row)].value)[0:4] == "http"):
45
+        if(str(sheet_ranges['B' + str(row)].value)[0:4] == "http"): #Check if link starts with http(s), if not add it.
44 46
             driver.get(sheet_ranges['B' + str(row)].value)
45 47
         else:
46 48
             driver.get("http://" + sheet_ranges['B' + str(row)].value)
@@ -59,6 +61,8 @@ while True:
59 61
 
60 62
 driver.quit()
61 63
 
64
+
65
+#Example Excel table layout
62 66
 #Filename	Link
63 67
 #google     google.de
64 68
 #homepage   https://jonasled.de

+ 53
- 1
geckodriver.log View File

@@ -5025,4 +5025,56 @@ JavaScript error: resource://gre/modules/ExtensionContent.jsm, line 492: TypeErr
5025 5025
 
5026 5026
 ###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
5027 5027
 
5028
-[GPU 10756
5028
+[GPU 107561554370473939	addons.webextension.screenshots@mozilla.org	WARN	Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid host permission: resource://pdf.js/
5029
+1554370473939	addons.webextension.screenshots@mozilla.org	WARN	Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid host permission: about:reader*
5030
+1554370476418	addons.webextension.<unknown>	WARN	Loading extension 'null': Reading manifest: Error processing background.persistent: Event pages are not currently supported. This will run as a persistent background page.
5031
+1554370476424	addons.webextension.<unknown>	WARN	Loading extension 'null': Reading manifest: Error processing storage: An unexpected property was found in the WebExtension manifest.
5032
+1554370476648	addons.webextension.{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}	WARN	Loading extension '{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}': Reading manifest: Error processing background.persistent: Event pages are not currently supported. This will run as a persistent background page.
5033
+1554370476658	addons.webextension.{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}	WARN	Loading extension '{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}': Reading manifest: Error processing storage: An unexpected property was found in the WebExtension manifest.
5034
+JavaScript warning: moz-extension://7dcf39e8-6638-4e29-bff5-f6d86992e3ad/lib/adblockplus.js, line 0: Successfully compiled asm.js code (total compilation time 2ms; not stored in cache (too small to benefit))
5035
+[Child 12100, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 332
5036
+[Child 11908, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 332
5037
+[Child 11908, JavaScript error: resource://gre/modules/Sqlite.jsm, line 841: Error: Connection is not open.
5038
+
5039
+###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
5040
+
5041
+[GPU 4241554370495254	addons.webextension.screenshots@mozilla.org	WARN	Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid host permission: resource://pdf.js/
5042
+1554370495255	addons.webextension.screenshots@mozilla.org	WARN	Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid host permission: about:reader*
5043
+1554370497549	addons.webextension.<unknown>	WARN	Loading extension 'null': Reading manifest: Error processing background.persistent: Event pages are not currently supported. This will run as a persistent background page.
5044
+1554370497556	addons.webextension.<unknown>	WARN	Loading extension 'null': Reading manifest: Error processing storage: An unexpected property was found in the WebExtension manifest.
5045
+1554370497749	addons.webextension.{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}	WARN	Loading extension '{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}': Reading manifest: Error processing background.persistent: Event pages are not currently supported. This will run as a persistent background page.
5046
+1554370497755	addons.webextension.{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}	WARN	Loading extension '{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}': Reading manifest: Error processing storage: An unexpected property was found in the WebExtension manifest.
5047
+Extension error: TypeError: response is undefined moz-extension://7e9225c1-fb51-46bd-9ccf-95e7c6d2ab31/include.preload.js 556
5048
+[[Exception stack
5049
+apply/<@moz-extension://7e9225c1-fb51-46bd-9ccf-95e7c6d2ab31/include.preload.js:556:7
5050
+Current stack
5051
+applySafeWithoutClone@resource://gre/modules/ExtensionCommon.jsm:529:133
5052
+wrapPromise/<@resource://gre/modules/ExtensionCommon.jsm:728:13
5053
+]]
5054
+JavaScript error: resource://gre/modules/ExtensionContent.jsm, line 492: TypeError: Argument 1 of PrecompiledScript.executeInGlobal is not an object.
5055
+JavaScript warning: moz-extension://7e9225c1-fb51-46bd-9ccf-95e7c6d2ab31/lib/adblockplus.js, line 0: Successfully compiled asm.js code (total compilation time 1ms; not stored in cache (too small to benefit))
5056
+[Child 11724, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 332
5057
+[Child 11724[Parent 3052, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 332
5058
+[Child 1908, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 332
5059
+[Child [Parent 3052, Gecko_IOThread] WARNING: file z:/build/build/src/ipc/chromium/src/base/process_util_win.cc, line 166
5060
+
5061
+###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
5062
+
5063
+[GPU 8048, Chrome_Ch1554370747229	addons.webextension.screenshots@mozilla.org	WARN	Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid host permission: resource://pdf.js/
5064
+1554370747229	addons.webextension.screenshots@mozilla.org	WARN	Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid host permission: about:reader*
5065
+1554370749931	addons.webextension.<unknown>	WARN	Loading extension 'null': Reading manifest: Error processing background.persistent: Event pages are not currently supported. This will run as a persistent background page.
5066
+1554370749937	addons.webextension.<unknown>	WARN	Loading extension 'null': Reading manifest: Error processing storage: An unexpected property was found in the WebExtension manifest.
5067
+1554370750165	addons.webextension.{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}	WARN	Loading extension '{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}': Reading manifest: Error processing background.persistent: Event pages are not currently supported. This will run as a persistent background page.
5068
+1554370750172	addons.webextension.{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}	WARN	Loading extension '{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}': Reading manifest: Error processing storage: An unexpected property was found in the WebExtension manifest.
5069
+JavaScript warning: moz-extension://e96c6102-81aa-47f0-b229-08ac423cfe65/lib/adblockplus.js, line 0: Successfully compiled asm.js code (total compilation time 1ms; not stored in cache (too small to benefit))
5070
+JavaScript error: resource://gre/modules/ExtensionContent.jsm, line 492: TypeError: Argument 1 of PrecompiledScript.executeInGlobal is not an object.
5071
+[Child 9364, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 332
5072
+[Child 6164, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 332
5073
+[Child 6164[Parent 8712, Gecko_IOThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 332
5074
+[Child 7400, Chrome_ChildThread] WARNING: pipe error: 109: file z:/build/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 332
5075
+[Child 7
5076
+###!!! [Child][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
5077
+
5078
+[GPU 2260, Chrom
5079
+###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv
5080
+

Loading…
Cancel
Save