@@ -4,92 +4,16 @@ if not messageIsRequest:
44 headerList = analyzedResponse.getHeaders()
55 bodyStr = helpers.bytesToString(response[analyzedResponse.getBodyOffset():]).encode('ascii','ignore')
66 stillTrash=[]
7- if "r.bing.com" in bodyStr:
8- if "| LinkedIn" in bodyStr:
9-
10- # this is the only modifiable part of the whole script
11- # ---------------------------------------
12- c = bodyStr.split("- COMPANYNAME")
13- # ---------------------------------------
14-
15- a = bodyStr.split("| LinkedIn")
16- b = bodyStr.split (" - LinkedIn")
17-
18- strs = a+b+c
19-
20- strs.pop(-1) #remove the last item
7+ if '<h3 class="LC20lb' in bodyStr:
8+ a = bodyStr.split('DKV0Md">')
9+ strs = a
2110 for str in strs:
2211 try:
23- name = (str.rsplit('https://www.linkedin.com/in',1)[1]).strip()
24-
25- except:
26- x="test"
27- try:
28- name = (str.rsplit("h=\"ID=SERP,",1)[1]).strip()
29- except:
30- x="test"
31-
32- try:
33- name = (str.rsplit("\">",1)[1]).strip()
34-
35- except:
36- x="test"
37- if "</strong> - " in name:
38- name = name.replace('<strong>', '')
39- name = name.replace('</strong>', '')
40- ab = (name.rsplit(" - ",2)[0]).strip()
41- print(ab)
42-
43-
44- if "window.google" in bodyStr:
45- if "| LinkedIn" in bodyStr:
46- a = bodyStr.split("| LinkedIn")
47- b = bodyStr.split (" - LinkedIn")
48- strs = a+b
49- strs.pop(-1) #remove the last item
50- for str in strs:
51- try:
52- name = (str.rsplit("x22",1)[1]).strip()
53- except:
54- z="test"
55- try:
56- name = (str.rsplit("null",1)[1]).strip()
57- except:
58- z="test"
59- try:
60- name = (str.rsplit("\">",1)[1]).strip()
61- if "x22" in name:
62- name = (str.rsplit("</body>",1)[1]).strip()
63- if "x22" in name:
64- name = (str.rsplit("</html>",1)[1]).strip()
65- if "x22" in name:
66- name = (str.rsplit("</div>",1)[1]).strip()
67- if "x22" in name:
68- name = (str.rsplit("x22",1)[1]).strip()
69- if "\"" in name:
70- name = (str.rsplit("\"",1)[1]).strip()
12+ if " | LinkedIn</h3>" or " - LinkedIn</h3>" in str:
13+ name = (str.split(" - ",1)[0].strip())
14+ if len(name) > 30:
15+ z="do nothing"
16+ else:
17+ print(name)
7118 except:
7219 z="test"
73- stillTrash.append(name)
74- endmysuffering = 'http'
75- new_list = [item for item in stillTrash if endmysuffering not in item]
76- ch = '-'
77- ca = '<strong>'
78- cb = '<\/strong>'
79- comma = ","
80- for x in new_list:
81- x = x.replace(',\\x22', '')
82- x = x.replace('"B.J."', '')
83-
84- strValue = x.split(ca, 1)[0]
85- strValue = strValue.split(cb, 1)[0]
86- strValue = strValue.split(ch, 1)[0]
87- if ("," in strValue):
88- strValue = x.split(comma, 1)[0]
89- else:
90- lzlz='do nothing'
91-
92- if (strValue == "</div></div></body></html>"):
93- asb='test'
94- else:
95- print(strValue)
0 commit comments