py2ls 0.1.4.1__tar.gz → 0.1.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/PKG-INFO +1 -1
- py2ls-0.1.4.2/py2ls/.git/COMMIT_EDITMSG +3 -0
- py2ls-0.1.4.2/py2ls/.git/FETCH_HEAD +1 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/index +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/logs/HEAD +3 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/logs/refs/heads/main +3 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/logs/refs/remotes/origin/HEAD +3 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/logs/refs/remotes/origin/main +3 -0
- py2ls-0.1.4.2/py2ls/.git/objects/1d/fe9d9633b24ea560354f4f93d39c6e5f163ea0 +0 -0
- py2ls-0.1.4.2/py2ls/.git/objects/24/6b368b986f758630c46dc02b7fa512b53422f7 +0 -0
- py2ls-0.1.4.2/py2ls/.git/objects/3b/bd972aa7ad680858f8dfbd0f7fcd97756f0d6f +0 -0
- py2ls-0.1.4.2/py2ls/.git/objects/3c/bbe5f4173d165127b9ad96119f1ec24c306ffc +0 -0
- py2ls-0.1.4.2/py2ls/.git/objects/48/a88fc5806305d0bb0755ee6801161b79696972 +2 -0
- py2ls-0.1.4.2/py2ls/.git/objects/6b/7fde264d93a7a0986d394c46c7650d0ce2ab92 +0 -0
- py2ls-0.1.4.2/py2ls/.git/objects/a7/3e13eafee65c5b8d73ad2d3ea46d0eee82f0d3 +0 -0
- py2ls-0.1.4.2/py2ls/.git/objects/db/ffa8ea7bda721d0cee7b9e4ce5b2ef927733ff +0 -0
- py2ls-0.1.4.2/py2ls/.git/objects/f4/b64d3107b39e3ad6f540c6607004ea34e6c024 +0 -0
- py2ls-0.1.4.2/py2ls/.git/refs/heads/main +1 -0
- py2ls-0.1.4.2/py2ls/.git/refs/remotes/origin/main +1 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/ips.py +29 -30
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/netfinder.py +29 -7
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/pyproject.toml +1 -1
- py2ls-0.1.4.1/py2ls/.git/COMMIT_EDITMSG +0 -1
- py2ls-0.1.4.1/py2ls/.git/FETCH_HEAD +0 -1
- py2ls-0.1.4.1/py2ls/.git/refs/heads/main +0 -1
- py2ls-0.1.4.1/py2ls/.git/refs/remotes/origin/main +0 -1
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/README.md +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/HEAD +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/config +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/description +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/hooks/applypatch-msg.sample +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/hooks/commit-msg.sample +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/hooks/fsmonitor-watchman.sample +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/hooks/post-update.sample +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/hooks/pre-applypatch.sample +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/hooks/pre-commit.sample +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/hooks/pre-merge-commit.sample +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/hooks/pre-push.sample +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/hooks/pre-rebase.sample +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/hooks/pre-receive.sample +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/hooks/prepare-commit-msg.sample +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/hooks/push-to-checkout.sample +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/hooks/update.sample +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/info/exclude +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/0b/409e1bc918277010f5679b402d1d1dda53e15c +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/14/449a0e6ba4ea2f1a73acf63ef91c9c6193f9ed +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/15/a8e468aacfcb440e090020f36d0b985d45da23 +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/25/b796accd261b9135fd32a2c00785f68edf6c46 +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/30/a2f8da47ee947811dc8d993f5a06a45de374f4 +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/36/b4a1b7403abc6c360f8fe2cb656ab945254971 +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/36/ef43e50009e59db11812c258846d9e38718173 +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/3f/d6561300938afbb3d11976cf9c8f29549280d9 +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/58/20a729045d4dc7e37ccaf8aa8eec126850afe2 +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/60/f273eb1c412d916fa3f11318a7da7a9911b52a +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/61/570cec8c061abe74121f27f5face6c69b98f99 +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/69/13c452ca319f7cbf6a0836dc10a5bb033c84e4 +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/78/3d4167bc95c9d2175e0df03ef1c1c880ba75ab +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/79/7ae089b2212a937840e215276005ce76881307 +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/7e/5956c806b5edc344d46dab599dec337891ba1f +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/87/ef1fc3f7f1ddc4d0ab9b3e65381ce9f3388621 +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/8e/55a7d2b96184030211f20c9b9af201eefcac82 +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/91/c69ad88fe0ba94aa7859fb5f7edac5e6f1a3f7 +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/9d/0df52899fe95279059286d9c0ec42287edc168 +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/a5/ec8f74642fbba27f7ea78c53b372ae0c7dedce +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/b0/56be4be89ba6b76949dd641df45bb7036050c8 +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/b0/9cd7856d58590578ee1a4f3ad45d1310a97f87 +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/b2/18e6a0f0f1c4df8cdefa9852058348abc713b7 +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/c4/cba65f1163661999ee4b8ed23342b63bc1300c +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/d9/005f2cc7fc4e65f14ed5518276007c08cf2fd0 +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/d9/c2403fd166ce791b4e9d0c6792ed8342c71fcd +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/df/e0770424b2a19faf507a501ebfc23be8f54e7b +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/e3/5a4dafc50850cacac7bf76c56db2715cbda2c4 +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/e9/391ffe371f1cc43b42ef09b705d9c767c2e14f +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/f7/c98ba5c2f903e603b1f5e63d49fbc8a43815cc +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/fc/292e793ecfd42240ac43be407023bd731fa9e7 +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/refs/remotes/origin/HEAD +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.gitattributes +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.gitignore +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/LICENSE +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/README.md +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/__init__.py +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/brain_atlas.py +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/correlators.py +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/dbhandler.py +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/freqanalysis.py +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/internet_finder.py +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/sleep_events_detectors.py +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/translator.py +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/version.py +0 -0
- {py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/wb_detector.py +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
48a88fc5806305d0bb0755ee6801161b79696972 branch 'main' of https://github.com/Jianfengliu0413/py2ls
|
Binary file
|
@@ -3,3 +3,6 @@ b056be4be89ba6b76949dd641df45bb7036050c8 d9c2403fd166ce791b4e9d0c6792ed8342c71fc
|
|
3
3
|
d9c2403fd166ce791b4e9d0c6792ed8342c71fcd 14449a0e6ba4ea2f1a73acf63ef91c9c6193f9ed Jianfeng <Jianfeng.Liu0413@gmail.com> 1718370666 +0200 commit: Update README.md
|
4
4
|
14449a0e6ba4ea2f1a73acf63ef91c9c6193f9ed 36ef43e50009e59db11812c258846d9e38718173 Jianfeng <Jianfeng.Liu0413@gmail.com> 1718371326 +0200 commit: Update README.md
|
5
5
|
36ef43e50009e59db11812c258846d9e38718173 0b409e1bc918277010f5679b402d1d1dda53e15c Jianfeng <Jianfeng.Liu0413@gmail.com> 1718392848 +0200 commit: readme
|
6
|
+
0b409e1bc918277010f5679b402d1d1dda53e15c 6b7fde264d93a7a0986d394c46c7650d0ce2ab92 Jianfeng <Jianfeng.Liu0413@gmail.com> 1718393734 +0200 commit: Update ips.py
|
7
|
+
6b7fde264d93a7a0986d394c46c7650d0ce2ab92 3bbd972aa7ad680858f8dfbd0f7fcd97756f0d6f Jianfeng <Jianfeng.Liu0413@gmail.com> 1718491087 +0200 commit: Update netfinder.py
|
8
|
+
3bbd972aa7ad680858f8dfbd0f7fcd97756f0d6f 48a88fc5806305d0bb0755ee6801161b79696972 Jianfeng <Jianfeng.Liu0413@gmail.com> 1718526957 +0200 commit: Update netfinder.py
|
@@ -3,3 +3,6 @@ b056be4be89ba6b76949dd641df45bb7036050c8 d9c2403fd166ce791b4e9d0c6792ed8342c71fc
|
|
3
3
|
d9c2403fd166ce791b4e9d0c6792ed8342c71fcd 14449a0e6ba4ea2f1a73acf63ef91c9c6193f9ed Jianfeng <Jianfeng.Liu0413@gmail.com> 1718370666 +0200 commit: Update README.md
|
4
4
|
14449a0e6ba4ea2f1a73acf63ef91c9c6193f9ed 36ef43e50009e59db11812c258846d9e38718173 Jianfeng <Jianfeng.Liu0413@gmail.com> 1718371326 +0200 commit: Update README.md
|
5
5
|
36ef43e50009e59db11812c258846d9e38718173 0b409e1bc918277010f5679b402d1d1dda53e15c Jianfeng <Jianfeng.Liu0413@gmail.com> 1718392848 +0200 commit: readme
|
6
|
+
0b409e1bc918277010f5679b402d1d1dda53e15c 6b7fde264d93a7a0986d394c46c7650d0ce2ab92 Jianfeng <Jianfeng.Liu0413@gmail.com> 1718393734 +0200 commit: Update ips.py
|
7
|
+
6b7fde264d93a7a0986d394c46c7650d0ce2ab92 3bbd972aa7ad680858f8dfbd0f7fcd97756f0d6f Jianfeng <Jianfeng.Liu0413@gmail.com> 1718491087 +0200 commit: Update netfinder.py
|
8
|
+
3bbd972aa7ad680858f8dfbd0f7fcd97756f0d6f 48a88fc5806305d0bb0755ee6801161b79696972 Jianfeng <Jianfeng.Liu0413@gmail.com> 1718526957 +0200 commit: Update netfinder.py
|
@@ -6,3 +6,6 @@ d9c2403fd166ce791b4e9d0c6792ed8342c71fcd d9c2403fd166ce791b4e9d0c6792ed8342c71fc
|
|
6
6
|
36ef43e50009e59db11812c258846d9e38718173 36ef43e50009e59db11812c258846d9e38718173 Jianfeng Liu <macjianfeng@jflmbp.speedport.ip> 1718390975 +0200 remote set-head
|
7
7
|
36ef43e50009e59db11812c258846d9e38718173 36ef43e50009e59db11812c258846d9e38718173 Jianfeng Liu <macjianfeng@jflmbp.speedport.ip> 1718392810 +0200 remote set-head
|
8
8
|
0b409e1bc918277010f5679b402d1d1dda53e15c 0b409e1bc918277010f5679b402d1d1dda53e15c Jianfeng Liu <macjianfeng@jflmbp.speedport.ip> 1718392852 +0200 remote set-head
|
9
|
+
6b7fde264d93a7a0986d394c46c7650d0ce2ab92 6b7fde264d93a7a0986d394c46c7650d0ce2ab92 Jianfeng Liu <macjianfeng@jflmbp.speedport.ip> 1718393737 +0200 remote set-head
|
10
|
+
3bbd972aa7ad680858f8dfbd0f7fcd97756f0d6f 3bbd972aa7ad680858f8dfbd0f7fcd97756f0d6f Jianfeng Liu <macjianfeng@jflmbp.speedport.ip> 1718491090 +0200 remote set-head
|
11
|
+
48a88fc5806305d0bb0755ee6801161b79696972 48a88fc5806305d0bb0755ee6801161b79696972 Jianfeng Liu <macjianfeng@jflmbp.speedport.ip> 1718526960 +0200 remote set-head
|
@@ -3,3 +3,6 @@ b056be4be89ba6b76949dd641df45bb7036050c8 d9c2403fd166ce791b4e9d0c6792ed8342c71fc
|
|
3
3
|
d9c2403fd166ce791b4e9d0c6792ed8342c71fcd 14449a0e6ba4ea2f1a73acf63ef91c9c6193f9ed Jianfeng <Jianfeng.Liu0413@gmail.com> 1718370668 +0200 update by push
|
4
4
|
14449a0e6ba4ea2f1a73acf63ef91c9c6193f9ed 36ef43e50009e59db11812c258846d9e38718173 Jianfeng <Jianfeng.Liu0413@gmail.com> 1718371329 +0200 update by push
|
5
5
|
36ef43e50009e59db11812c258846d9e38718173 0b409e1bc918277010f5679b402d1d1dda53e15c Jianfeng <Jianfeng.Liu0413@gmail.com> 1718392851 +0200 update by push
|
6
|
+
0b409e1bc918277010f5679b402d1d1dda53e15c 6b7fde264d93a7a0986d394c46c7650d0ce2ab92 Jianfeng <Jianfeng.Liu0413@gmail.com> 1718393736 +0200 update by push
|
7
|
+
6b7fde264d93a7a0986d394c46c7650d0ce2ab92 3bbd972aa7ad680858f8dfbd0f7fcd97756f0d6f Jianfeng <Jianfeng.Liu0413@gmail.com> 1718491090 +0200 update by push
|
8
|
+
3bbd972aa7ad680858f8dfbd0f7fcd97756f0d6f 48a88fc5806305d0bb0755ee6801161b79696972 Jianfeng <Jianfeng.Liu0413@gmail.com> 1718526959 +0200 update by push
|
@@ -0,0 +1 @@
|
|
1
|
+
48a88fc5806305d0bb0755ee6801161b79696972
|
@@ -0,0 +1 @@
|
|
1
|
+
48a88fc5806305d0bb0755ee6801161b79696972
|
@@ -778,36 +778,6 @@ def dir_name(fpath):
|
|
778
778
|
return dirname(fpath)
|
779
779
|
def basename(fpath):
|
780
780
|
return os.path.basename(fpath)
|
781
|
-
|
782
|
-
def finfo(fpath):
|
783
|
-
fname, fmt = os.path.splitext(fpath)
|
784
|
-
dir_par = os.path.dirname(fpath) + '/'
|
785
|
-
data = {
|
786
|
-
"size": round(os.path.getsize(fpath) / 1024 / 1024, 3),
|
787
|
-
"creation_time": time.ctime(os.path.getctime(fpath)),
|
788
|
-
"ctime": time.ctime(os.path.getctime(fpath)),
|
789
|
-
"mod_time": time.ctime(os.path.getmtime(fpath)),
|
790
|
-
"mtime": time.ctime(os.path.getmtime(fpath)),
|
791
|
-
"parent_dir": dir_par,
|
792
|
-
"fname": fname.replace(dir_par, ""),
|
793
|
-
"kind": fmt
|
794
|
-
}
|
795
|
-
extra_info = {}
|
796
|
-
if data["kind"] == ".pdf":
|
797
|
-
extra_info = pdfinfo_from_path(fpath)
|
798
|
-
|
799
|
-
return FileInfo(
|
800
|
-
size=data["size"],
|
801
|
-
creation_time=data["creation_time"],
|
802
|
-
ctime=data["ctime"],
|
803
|
-
mod_time=data["mod_time"],
|
804
|
-
mtime=data["mtime"],
|
805
|
-
parent_dir=data["parent_dir"],
|
806
|
-
fname=data["fname"],
|
807
|
-
kind=data["kind"],
|
808
|
-
extra_info=extra_info
|
809
|
-
)
|
810
|
-
|
811
781
|
def listdir(
|
812
782
|
rootdir,
|
813
783
|
kind="folder",
|
@@ -2841,3 +2811,32 @@ class FileInfo:
|
|
2841
2811
|
"kind": self.kind,
|
2842
2812
|
**{key: getattr(self, key) for key in vars(self) if key not in ["size", "creation_time", "ctime", "mod_time", "mtime", "parent_dir", "fname", "kind"]}
|
2843
2813
|
}
|
2814
|
+
|
2815
|
+
def finfo(fpath):
|
2816
|
+
fname, fmt = os.path.splitext(fpath)
|
2817
|
+
dir_par = os.path.dirname(fpath) + '/'
|
2818
|
+
data = {
|
2819
|
+
"size": round(os.path.getsize(fpath) / 1024 / 1024, 3),
|
2820
|
+
"creation_time": time.ctime(os.path.getctime(fpath)),
|
2821
|
+
"ctime": time.ctime(os.path.getctime(fpath)),
|
2822
|
+
"mod_time": time.ctime(os.path.getmtime(fpath)),
|
2823
|
+
"mtime": time.ctime(os.path.getmtime(fpath)),
|
2824
|
+
"parent_dir": dir_par,
|
2825
|
+
"fname": fname.replace(dir_par, ""),
|
2826
|
+
"kind": fmt
|
2827
|
+
}
|
2828
|
+
extra_info = {}
|
2829
|
+
if data["kind"] == ".pdf":
|
2830
|
+
extra_info = pdfinfo_from_path(fpath)
|
2831
|
+
|
2832
|
+
return FileInfo(
|
2833
|
+
size=data["size"],
|
2834
|
+
creation_time=data["creation_time"],
|
2835
|
+
ctime=data["ctime"],
|
2836
|
+
mod_time=data["mod_time"],
|
2837
|
+
mtime=data["mtime"],
|
2838
|
+
parent_dir=data["parent_dir"],
|
2839
|
+
fname=data["fname"],
|
2840
|
+
kind=data["kind"],
|
2841
|
+
extra_info=extra_info
|
2842
|
+
)
|
@@ -20,7 +20,7 @@ from selenium.webdriver.chrome.options import Options
|
|
20
20
|
from selenium.webdriver.support.ui import WebDriverWait
|
21
21
|
from selenium.webdriver.support import expected_conditions as EC
|
22
22
|
from webdriver_manager.chrome import ChromeDriverManager
|
23
|
-
|
23
|
+
import pprint
|
24
24
|
|
25
25
|
# Set up logging
|
26
26
|
logging.basicConfig(level=logging.INFO)
|
@@ -344,7 +344,7 @@ def pdf_detector(url, contains=None, dir_save=None,booster=False):
|
|
344
344
|
pdf_links = filter_links(links=links_all, contains=["pdf"])
|
345
345
|
|
346
346
|
if pdf_links:
|
347
|
-
|
347
|
+
pprint.pp(f"pdf detected\n{pdf_links}")
|
348
348
|
else:
|
349
349
|
print('no pdf file')
|
350
350
|
if dir_save:
|
@@ -450,7 +450,6 @@ def content_div_class(content, div="div", div_class="highlight"):
|
|
450
450
|
return texts
|
451
451
|
|
452
452
|
|
453
|
-
|
454
453
|
def fetch_selenium(
|
455
454
|
url,
|
456
455
|
where="div",
|
@@ -468,7 +467,11 @@ def fetch_selenium(
|
|
468
467
|
username_by=By.NAME,
|
469
468
|
password_by=By.NAME,
|
470
469
|
submit_by=By.NAME,
|
470
|
+
cap_mode='eager', # eager or none
|
471
471
|
proxy=None, # Add proxy parameter
|
472
|
+
javascript=True, # Add JavaScript option
|
473
|
+
disable_images=False, # Add option to disable images
|
474
|
+
iframe_name=None, # Add option to handle iframe
|
472
475
|
**kwargs
|
473
476
|
):
|
474
477
|
chrome_options = Options()
|
@@ -476,13 +479,25 @@ def fetch_selenium(
|
|
476
479
|
chrome_options.add_argument("--no-sandbox")
|
477
480
|
chrome_options.add_argument("--disable-dev-shm-usage")
|
478
481
|
chrome_options.add_argument(f"user-agent={user_agent()}")
|
482
|
+
|
479
483
|
if proxy:
|
480
484
|
chrome_options.add_argument(f'--proxy-server={proxy}')
|
481
|
-
|
482
|
-
|
485
|
+
|
486
|
+
if disable_images:
|
487
|
+
prefs = {"profile.managed_default_content_settings.images": 2}
|
488
|
+
chrome_options.add_experimental_option("prefs", prefs)
|
489
|
+
|
490
|
+
caps = DesiredCapabilities().CHROME
|
491
|
+
caps["pageLoadStrategy"] = "eager" # You can set this to "none" if needed
|
492
|
+
|
493
|
+
service = Service(ChromeDriverManager().install())
|
483
494
|
for attempt in range(retry):
|
484
495
|
try:
|
485
|
-
driver = webdriver.Chrome(service=service, options=chrome_options)
|
496
|
+
driver = webdriver.Chrome(service=service, options=chrome_options, desired_capabilities=caps)
|
497
|
+
|
498
|
+
if not javascript:
|
499
|
+
driver.execute_cdp_cmd("Emulation.setScriptExecutionDisabled", {"value": True})
|
500
|
+
|
486
501
|
if login_url:
|
487
502
|
driver.get(login_url)
|
488
503
|
WebDriverWait(driver, timeout).until(
|
@@ -496,6 +511,13 @@ def fetch_selenium(
|
|
496
511
|
).click()
|
497
512
|
|
498
513
|
driver.get(url)
|
514
|
+
|
515
|
+
if iframe_name:
|
516
|
+
iframe = WebDriverWait(driver, timeout).until(
|
517
|
+
EC.presence_of_element_located((By.NAME, iframe_name))
|
518
|
+
)
|
519
|
+
driver.switch_to.frame(iframe)
|
520
|
+
|
499
521
|
WebDriverWait(driver, timeout).until(
|
500
522
|
EC.presence_of_element_located((by, where))
|
501
523
|
)
|
@@ -503,7 +525,7 @@ def fetch_selenium(
|
|
503
525
|
driver.quit()
|
504
526
|
|
505
527
|
content = BeautifulSoup(page_source, "html.parser")
|
506
|
-
texts=extract_text_from_content(content, where=where,what=what,extend=extend
|
528
|
+
texts = extract_text_from_content(content, where=where, what=what, extend=extend, **kwargs)
|
507
529
|
return texts
|
508
530
|
except Exception as e:
|
509
531
|
# logger.error(f"Attempt {attempt + 1} failed with error ")
|
@@ -1 +0,0 @@
|
|
1
|
-
readme
|
@@ -1 +0,0 @@
|
|
1
|
-
0b409e1bc918277010f5679b402d1d1dda53e15c branch 'main' of https://github.com/Jianfengliu0413/py2ls
|
@@ -1 +0,0 @@
|
|
1
|
-
0b409e1bc918277010f5679b402d1d1dda53e15c
|
@@ -1 +0,0 @@
|
|
1
|
-
0b409e1bc918277010f5679b402d1d1dda53e15c
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/0b/409e1bc918277010f5679b402d1d1dda53e15c
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/14/449a0e6ba4ea2f1a73acf63ef91c9c6193f9ed
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/15/a8e468aacfcb440e090020f36d0b985d45da23
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/25/b796accd261b9135fd32a2c00785f68edf6c46
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/30/a2f8da47ee947811dc8d993f5a06a45de374f4
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/36/b4a1b7403abc6c360f8fe2cb656ab945254971
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/36/ef43e50009e59db11812c258846d9e38718173
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/3f/d6561300938afbb3d11976cf9c8f29549280d9
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/58/20a729045d4dc7e37ccaf8aa8eec126850afe2
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/60/f273eb1c412d916fa3f11318a7da7a9911b52a
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/61/570cec8c061abe74121f27f5face6c69b98f99
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/69/13c452ca319f7cbf6a0836dc10a5bb033c84e4
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/78/3d4167bc95c9d2175e0df03ef1c1c880ba75ab
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/79/7ae089b2212a937840e215276005ce76881307
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/7e/5956c806b5edc344d46dab599dec337891ba1f
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/87/ef1fc3f7f1ddc4d0ab9b3e65381ce9f3388621
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/8e/55a7d2b96184030211f20c9b9af201eefcac82
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/91/c69ad88fe0ba94aa7859fb5f7edac5e6f1a3f7
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/9d/0df52899fe95279059286d9c0ec42287edc168
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/a5/ec8f74642fbba27f7ea78c53b372ae0c7dedce
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/b0/56be4be89ba6b76949dd641df45bb7036050c8
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/b0/9cd7856d58590578ee1a4f3ad45d1310a97f87
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/b2/18e6a0f0f1c4df8cdefa9852058348abc713b7
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/c4/cba65f1163661999ee4b8ed23342b63bc1300c
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/d9/005f2cc7fc4e65f14ed5518276007c08cf2fd0
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/d9/c2403fd166ce791b4e9d0c6792ed8342c71fcd
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/df/e0770424b2a19faf507a501ebfc23be8f54e7b
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/e3/5a4dafc50850cacac7bf76c56db2715cbda2c4
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/e9/391ffe371f1cc43b42ef09b705d9c767c2e14f
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/f7/c98ba5c2f903e603b1f5e63d49fbc8a43815cc
RENAMED
File without changes
|
{py2ls-0.1.4.1 → py2ls-0.1.4.2}/py2ls/.git/objects/fc/292e793ecfd42240ac43be407023bd731fa9e7
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|