- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
希望你一切都好。我是 Python 新手,使用的是 python 2.7。
我试图仅从此公共(public)网站业务目录中提取网站:https://www.dmcc.ae/business-directory
我正在寻找的网站是每个小部件中提到的网站。遗憾的是,该目录没有 API。
我正在使用 BeautifulSoup,但到目前为止还没有成功。
这是我的代码:
import urllib
from bs4 import BeautifulSoup
website = raw_input("Type Website:>\n")
html = urllib.urlopen('https://'+ website).read()
soup = BeautifulSoup(html)
tags = soup('a')
for tag in tags:
print tag.get('href', None)
我得到的只是实际网站的网站,例如 http://portal.dmcc.ae以及其他 href 而不是小部件中的网站。我也尝试用汤('class')替换汤('a'),但没有运气!有人可以帮我吗?
最佳答案
数据是通过ajax请求使用Jquery动态生成的,您可以对url进行get请求来获取动态加载的数据:
from requests import Session
from time import time
data = {
"page_num": "1", # set it to whatever page you like
"query_type": "activities",
"_": str(int(time()))}
js_url = "https://dmcc.secure.force.com/services/apexrest/DMCC_BusinessDirectory_API_1/get"
with Session() as s:
soup = BeautifulSoup(s.get("https://www.dmcc.ae/business-directory").content, "html.parser")
r = s.get(js_url, params=data)
data = r.json()
这会给你:
{u'success': True, u'requestURI': u'/DMCC_BusinessDirectory_API_1/get', u'params': [u'DMCC_BusinessDirectory_API_1', u'get', u' ', u' '], u'message': u'Getting all activities.', u'sObjects': [{u'Account__c': u'001b000000MV4LaAAL', u'Building__c': u'55.1450717', u'Property_Location__r': {u'attributes': {u'url': u'/services/data/v37.0/sobjects/Property_Location__c/a1G10000000XPVOEA4', u'type': u'Property_Location__c'}, u'Id': u'a1G10000000XPVOEA4', u'Function_Type_Class__c': u'Office', u'Name': u'PL-032972'}, u'Operating_Name__c': u'001b000000MV4LaAAL', u'Longitude__c': u'55.1450717', u'License_Address_for_Business_Directroy__c': u'Unit No: 3006-002<br>Mazaya Business Avenue BB1<br>Jumeirah Lakes Towers<br>Dubai<br>UAE', u'License_Status__c': u'Active', u'Property_Location__c': u'a1G10000000XPVOEA4', u'attributes': {u'url': u'/services/data/v37.0/sobjects/License__c/a03b0000006h16cAAA', u'type': u'License__c'}, u'Operating_Name__r': {u'attributes': {u'url': u'/services/data/v37.0/sobjects/Account/001b000000MV4LaAAL', u'type': u'Account'}, u'Id': u'001b000000MV4LaAAL', u'Name': u'1 ON 1 HR CONSULTING DMCC'}, u'License_Address__c': u'Unit No: 3006-002<br>Mazaya Business Avenue BB1<br>Plot No: JLTE-PH2-BB1<br>Jumeirah Lakes Towers<br>Dubai<br>UAE', u'Id': u'a03b0000006h16cAAA', u'Latitude__c': u'25.06828081', u'Account__r': {u'Company_Official_Email_Address__c': u'resume@1on1hrconsulting.com', u'Monday_To__c': u'18:00', u'Tuesday_To__c': u'18:00', u'Thursday_To__c': u'18:00', u'Id': u'001b000000MV4LaAAL', u'Operating_Time_from_regular__c': u'08:00', u'Name': u'1 ON 1 HR CONSULTING DMCC', u'Tuesday_From__c': u'08:00', u'LinkedIn_URL__c': u'https://www.linkedin.com/company/1on1-hr-consulting', u'Saturday_From__c': u'Closed', u'Phone_BD__c': u'+97144470173', u'Facebook_Link__c': u'https://www.facebook.com/duabiinterviewandresumecoaching', u'Wednesday_To__c': u'18:00', u'Operating_Time_to_regular__c': u'18:00', u'Friday_To__c': u'Closed', u'Friday_From__c': u'Closed', u'Monday_From__c': u'08:00', u'Saturday_To__c': u'Closed', u'Company_Website_Address__c': u'www.1on1hrconsulting.com', u'Wednesday_From__c': u'08:00', u'attributes': {u'url': u'/services/data/v37.0/sobjects/Account/001b000000MV4LaAAL', u'type': u'Account'}, u'Thursday_From__c': u'08:00', u'Publishing_agreement_for_BD__c': u'Publish all details in DMCC online/printed content'}}, {u'Account__c': u'001b000000MV2s2AAD', u'Building__c': u'Gold Tower (AU)', u'Property_Location__r': {u'attributes': {u'url': u'/services/data/v37.0/sobjects/Property_Location__c/a1G10000000XHiKEAW', u'type': u'Property_Location__c'}, u'Id': u'a1G10000000XHiKEAW', u'Function_Type_Class__c': u'Office', u'Name': u'PL-005466'}, u'Operating_Name__c': u'001b000000MV2s2AAD', u'Longitude__c': u'55.14324963', u'License_Address_for_Business_Directroy__c': u'Unit No: AU-23-J<br>Gold Tower (AU)<br>Jumeirah Lakes Towers<br>Dubai<br>United Arab Emirates', u'License_Status__c': u'Active', u'Property_Location__c': u'a1G10000000XHiKEAW', u'attributes': {u'url': u'/services/data/v37.0/sobjects/License__c/a03b0000006h1DaAAI', u'type': u'License__c'}, u'Operating_Name__r': {u'attributes': {u'url': u'/services/data/v37.0/sobjects/Account/001b000000MV2s2AAD', u'type': u'Account'}, u'Id': u'001b000000MV2s2AAD', u'Name': u'1 PLATINUM CONCIERGE MANAGEMENT DMCC'}, u'License_Address__c': u'Unit No: AU-23-J<br>Gold Tower (AU)<br>Plot No: JLT-PH1-I3A<br>Jumeirah Lakes Towers<br>Dubai<br>United Arab Emirates', u'Id': u'a03b0000006h1DaAAI', u'Latitude__c': u'25.06937097', u'Account__r': {u'Saturday_To__c': u'Closed', u'Tuesday_From__c': u'09:00', u'Friday_From__c': u'Closed', u'Phone_BD__c': u'+971505687478', u'Monday_From__c': u'09:00', u'Monday_To__c': u'21:00', u'Publishing_agreement_for_BD__c': u'Publish only name and address in DMCC online/printed content', u'Company_Official_Email_Address__c': u'melvin@1boxoffice.ae', u'Company_Website_Address__c': u'www.1platinumconcierge.com', u'Operating_Time_to_regular__c': u'21:00', u'Friday_To__c': u'Closed', u'Tuesday_To__c': u'21:00', u'Wednesday_To__c': u'21:00', u'Wednesday_From__c': u'09:00', u'Thursday_To__c': u'21:00', u'Saturday_From__c': u'Closed', u'attributes': {u'url': u'/services/data/v37.0/sobjects/Account/001b000000MV2s2AAD', u'type': u'Account'}, u'Thursday_From__c': u'09:00', u'Id': u'001b000000MV2s2AAD', u'Operating_Time_from_regular__c': u'09:00', u'Name': u'1 PLATINUM CONCIERGE MANAGEMENT DMCC'}}, {u'Account__c': u'0011000000jki9iAAA', u'Building__c': u'Tiffany Towers', u'Property_Location__r': {u'attributes': {u'url': u'/services/data/v37.0/sobjects/Property_Location__c/a1G10000000XL4ZEAW', u'type': u'Property_Location__c'}, u'Id': u'a1G10000000XL4ZEAW', u'Function_Type_Class__c': u'Office', u'Name': u'PL-015938'}, u'Operating_Name__c': u'0011000000jki9iAAA', u'Longitude__c': u'55.14960835', u'License_Address_for_Business_Directroy__c': u'Unit No: 1906<br>Tiffany Towers<br>Jumeirah Lakes Towers<br>Dubai<br>UAE', u'License_Status__c': u'Active', u'Property_Location__c': u'a1G10000000XL4ZEAW', u'attributes': {u'url': u'/services/data/v37.0/sobjects/License__c/a031000000LBSCcAAP', u'type': u'License__c'}, u'Operating_Name__r': {u'attributes': {u'url': u'/services/data/v37.0/sobjects/Account/0011000000jki9iAAA', u'type': u'Account'}, u'Id': u'0011000000jki9iAAA', u'Name': u'1000HEADS CONSULTING DMCC'}, u'License_Address__c': u'Unit No: 1906<br>Tiffany Towers<br>Plot No: JLT-PH2-W2A<br>Jumeirah Lakes Towers<br>Dubai<br>UAE', u'Id': u'a031000000LBSCcAAP', u'Latitude__c': u'25.07726334', u'Account__r': {u'Company_Official_Email_Address__c': u'dubai@1000heads.com', u'Monday_To__c': u'18:00', u'Tuesday_To__c': u'18:00', u'Thursday_To__c': u'18:00', u'Id': u'0011000000jki9iAAA', u'Operating_Time_from_regular__c': u'09:00', u'Name': u'1000HEADS CONSULTING DMCC', u'Tuesday_From__c': u'09:00', u'Twitter_Name__c': u'@1000heads', u'Saturday_From__c': u'Closed', u'Phone_BD__c': u'+97143641221', u'Friday_To__c': u'Closed', u'Wednesday_To__c': u'18:00', u'Operating_Time_to_regular__c': u'18:00', u'Friday_From__c': u'Closed', u'Monday_From__c': u'09:00', u'Saturday_To__c': u'Closed', u'Company_Website_Address__c': u'www.1000heads.com', u'Wednesday_From__c': u'09:00', u'attributes': {u'url': u'/services/data/v37.0/sobjects/Account/0011000000jki9iAAA', u'type': u'Account'}, u'Thursday_From__c': u'09:00', u'Publishing_agreement_for_BD__c': u'Publish only name and address in DMCC online/printed content'}}, {u'Account__c': u'0011000000jkjRyAAI', u'Building__c': u'Platinum Tower', u'Property_Location__r': {u'attributes': {u'url': u'/services/data/v37.0/sobjects/Property_Location__c/a1G10000000XKGtEAO', u'type': u'Property_Location__c'}, u'Id': u'a1G10000000XKGtEAO', u'Function_Type_Class__c': u'Retail', u'Name': u'PL-012858'}, u'Operating_Name__c': u'0011000000jkjRyAAI', u'Longitude__c': u'55.14244634', u'License_Address_for_Business_Directroy__c': u'Unit No: G07<br>Platinum Tower<br>Jumeirah Lakes Towers<br>Dubai<br>UAE', u'License_Status__c': u'Active', u'Property_Location__c': u'a1G10000000XKGtEAO', u'attributes': {u'url': u'/services/data/v37.0/sobjects/License__c/a031000000Li7cUAAR', u'type': u'License__c'}, u'Operating_Name__r': {u'attributes': {u'url': u'/services/data/v37.0/sobjects/Account/0011000000jkjRyAAI', u'type': u'Account'}, u'Id': u'0011000000jkjRyAAI', u'Name': u'101 PARATHAS DMCC'}, u'License_Address__c': u'Unit No: G07<br>Platinum Tower<br>Plot No: JLT-PH1-I2<br>Jumeirah Lakes Towers<br>Dubai<br>UAE', u'Id': u'a031000000Li7cUAAR', u'Latitude__c': u'25.06927734', u'Account__r': {u'Company_Official_Email_Address__c': u'pankajpathak@hotmail.com', u'Monday_To__c': u'23:00', u'Tuesday_To__c': u'23:00', u'Thursday_To__c': u'23:00', u'Id': u'0011000000jkjRyAAI', u'Operating_Time_from_regular__c': u'09:00', u'Name': u'101 PARATHAS DMCC', u'Tuesday_From__c': u'09:00', u'Twitter_Name__c': u'www.twitter.com/101parathas', u'Saturday_From__c': u'09:00', u'Phone_BD__c': u'+97144249950', u'Facebook_Link__c': u'www.facebook.com/101parathas', u'Wednesday_To__c': u'23:00', u'Operating_Time_to_regular__c': u'23:00', u'Friday_To__c': u'23:00', u'Friday_From__c': u'09:00', u'Monday_From__c': u'09:00', u'Saturday_To__c': u'23:00', u'Company_Website_Address__c': u'www.101parathas.com', u'Wednesday_From__c': u'09:00', u'attributes': {u'url': u'/services/data/v37.0/sobjects/Account/0011000000jkjRyAAI', u'type': u'Account'}, u'Thursday_From__c': u'09:00', u'Publishing_agreement_for_BD__c': u'Publish all details in DMCC online/printed content'}}, {u'Account__c': u'0011000000kWyCsAAK', u'License_Status__c': u'Active', u'Property_Location__r': {u'attributes': {u'url': u'/services/data/v37.0/sobjects/Property_Location__c/a1G10000000XHXzEAO', u'type': u'Property_Location__c'}, u'Id': u'a1G10000000XHXzEAO', u'Function_Type_Class__c': u'Flexi Desk', u'Name': u'PL-004825'}, u'Account__r': {u'Saturday_To__c': u'Closed', u'Tuesday_From__c': u'09:00', u'Friday_From__c': u'Closed', u'Phone_BD__c': u'+971529859280', u'Monday_From__c': u'09:00', u'Monday_To__c': u'18:00', u'Publishing_agreement_for_BD__c': u'Publish only name and address in DMCC online/printed content', u'Company_Official_Email_Address__c': u'csaplala@lkmbgroup.com', u'Company_Website_Address__c': u'www', u'Operating_Time_to_regular__c': u'18:00', u'Friday_To__c': u'Closed', u'Tuesday_To__c': u'18:00', u'Wednesday_To__c': u'18:00', u'Wednesday_From__c': u'09:00', u'Thursday_To__c': u'18:00', u'Saturday_From__c': u'Closed', u'attributes': {u'url': u'/services/data/v37.0/sobjects/Account/0011000000kWyCsAAK', u'type': u'Account'}, u'Thursday_From__c': u'09:00', u'Id': u'0011000000kWyCsAAK', u'Operating_Time_from_regular__c': u'09:00', u'Name': u'1682 CONSULTING DMCC'}, u'Building__c': u'55.13646334', u'Property_Location__c': u'a1G10000000XHXzEAO', u'attributes': {u'url': u'/services/data/v37.0/sobjects/License__c/a031000000N2n8DAAR', u'type': u'License__c'}, u'License_Address__c': u'Unit No: 3O-01-1057<br>Jewellery & Gemplex 3<br>Plot No: DMCC-PH2-J&GPlexS<br>Jewellery & Gemplex<br>Dubai<br>United Arab Emirates', u'Id': u'a031000000N2n8DAAR'}, {u'Account__c': u'0011000000riesbAAA', u'Building__c': u'55.13646334', u'Property_Location__r': {u'attributes': {u'url': u'/services/data/v37.0/sobjects/Property_Location__c/a1G10000000XHGNEA4', u'type': u'Property_Location__c'}, u'Id': u'a1G10000000XHGNEA4', u'Function_Type_Class__c': u'Flexi Desk', u'Name': u'PL-003733'}, u'Operating_Name__c': u'00110000012j7wXAAQ', u'Account__r': {u'Saturday_To__c': u'Closed', u'Tuesday_From__c': u'09:00', u'Friday_From__c': u'Closed', u'Phone_BD__c': u'+971502473000', u'Monday_From__c': u'09:00', u'Monday_To__c': u'13:00', u'Publishing_agreement_for_BD__c': u'Publish only name and address in DMCC online/printed content', u'Company_Official_Email_Address__c': u'thaer@1765hospitlity.com', u'Company_Website_Address__c': u'www.1765hospitality.com', u'Operating_Time_to_regular__c': u'13:00', u'Friday_To__c': u'Closed', u'Tuesday_To__c': u'13:00', u'Wednesday_To__c': u'13:00', u'Wednesday_From__c': u'09:00', u'Thursday_To__c': u'13:00', u'Saturday_From__c': u'Closed', u'attributes': {u'url': u'/services/data/v37.0/sobjects/Account/0011000000riesbAAA', u'type': u'Account'}, u'Thursday_From__c': u'09:00', u'Id': u'0011000000riesbAAA', u'Operating_Time_from_regular__c': u'09:00', u'Name': u'1765 HOSPITALITY DMCC'}, u'License_Status__c': u'Active', u'Property_Location__c': u'a1G10000000XHGNEA4', u'attributes': {u'url': u'/services/data/v37.0/sobjects/License__c/a031000000TaAN9AAN', u'type': u'License__c'}, u'Operating_Name__r': {u'attributes': {u'url': u'/services/data/v37.0/sobjects/Account/00110000012j7wXAAQ', u'type': u'Account'}, u'Id': u'00110000012j7wXAAQ', u'Name': u'SPIKY HOUSE OF CHICKEN'}, u'License_Address__c': u'Unit No: 3O-01-398<br>Jewellery & Gemplex 3<br>Plot No: DMCC-PH2-J&GPlexS<br>Jewellery & Gemplex<br>Dubai<br>United Arab Emirates', u'Id': u'a031000000TaAN9AAN'}, {u'Account__c': u'0011000000xj8H3AAI', u'Building__c': u'55.15331119', u'Property_Location__r': {u'attributes': {u'url': u'/services/data/v37.0/sobjects/Property_Location__c/a1G10000001YJ39EAG', u'type': u'Property_Location__c'}, u'Id': u'a1G10000001YJ39EAG', u'Function_Type_Class__c': u'Office', u'Name': u'PL-180144'}, u'Longitude__c': u'55.15331119', u'License_Address_for_Business_Directroy__c': u'Unit No: 2703-B<br>Jumeirah Bay Tower X3<br>Jumeirah Lakes Towers<br>Dubai<br>UAE', u'License_Status__c': u'Active', u'Property_Location__c': u'a1G10000001YJ39EAG', u'attributes': {u'url': u'/services/data/v37.0/sobjects/License__c/a031000000YZaeMAAT', u'type': u'License__c'}, u'License_Address__c': u'Unit No: 2703-B<br>Jumeirah Bay Tower X3<br>Plot No: JLT-PH2-X3A<br>Jumeirah Lakes Towers<br>Dubai<br>UAE', u'Id': u'a031000000YZaeMAAT', u'Latitude__c': u'25.08018592', u'Account__r': {u'Company_Official_Email_Address__c': u'lobo.rosario@alwadiholding.com', u'Monday_To__c': u'20:00', u'Tuesday_To__c': u'20:00', u'Thursday_To__c': u'20:00', u'Operating_Time_from_regular__c': u'07:00', u'Name': u'1851 LAUNDRY AND DRY CLEANING SERVICES DMCC', u'Website': u'www1851laundries.com', u'Tuesday_From__c': u'07:00', u'Saturday_From__c': u'07:00', u'Phone_BD__c': u'+971508669551', u'Friday_To__c': u'20:00', u'Wednesday_To__c': u'20:00', u'Operating_Time_to_regular__c': u'20:00', u'Saturday_To__c': u'20:00', u'Friday_From__c': u'14:00', u'Monday_From__c': u'07:00', u'Publishing_agreement_for_BD__c': u'Publish all details in DMCC online/printed content', u'Company_Website_Address__c': u'www.1851laundries.com', u'Id': u'0011000000xj8H3AAI', u'attributes': {u'url': u'/services/data/v37.0/sobjects/Account/0011000000xj8H3AAI', u'type': u'Account'}, u'Thursday_From__c': u'07:00', u'Wednesday_From__c': u'07:00'}}, {u'Account__c': u'0011000000rhvGWAAY', u'License_Status__c': u'Active', u'Property_Location__r': {u'attributes': {u'url': u'/services/data/v37.0/sobjects/Property_Location__c/a1G10000000XHwFEAW', u'type': u'Property_Location__c'}, u'Id': u'a1G10000000XHwFEAW', u'Function_Type_Class__c': u'Flexi Desk', u'Name': u'PL-006329'}, u'Account__r': {u'Saturday_To__c': u'20:00', u'Tuesday_From__c': u'08:00', u'Friday_From__c': u'08:00', u'Phone_BD__c': u'+971562160241', u'Monday_From__c': u'08:00', u'Monday_To__c': u'20:00', u'Publishing_agreement_for_BD__c': u'Publish only name and address in DMCC online/printed content', u'Company_Official_Email_Address__c': u'l.olivari@gmail.com', u'Company_Website_Address__c': u'N.A.', u'Operating_Time_to_regular__c': u'20:00', u'Friday_To__c': u'20:00', u'Tuesday_To__c': u'20:00', u'Wednesday_To__c': u'20:00', u'Wednesday_From__c': u'08:00', u'Thursday_To__c': u'20:00', u'Saturday_From__c': u'08:00', u'attributes': {u'url': u'/services/data/v37.0/sobjects/Account/0011000000rhvGWAAY', u'type': u'Account'}, u'Thursday_From__c': u'08:00', u'Id': u'0011000000rhvGWAAY', u'Operating_Time_from_regular__c': u'08:00', u'Name': u'19 FAMILY & BUSINESS DMCC'}, u'Building__c': u'55.13646334', u'Property_Location__c': u'a1G10000000XHwFEAW', u'attributes': {u'url': u'/services/data/v37.0/sobjects/License__c/a031000000RhyojAAB', u'type': u'License__c'}, u'License_Address__c': u'Unit No: 3O-01-654<br>Jewellery & Gemplex 3<br>Plot No: DMCC-PH2-J&GPlexS<br>Jewellery & Gemplex<br>Dubai<br>United Arab Emirates', u'Id': u'a031000000RhyojAAB'}, {u'Account__c': u'001b000000MV2kHAAT', u'Building__c': u'Tiffany Towers', u'Property_Location__r': {u'attributes': {u'url': u'/services/data/v37.0/sobjects/Property_Location__c/a1G10000000XJi2EAG', u'type': u'Property_Location__c'}, u'Id': u'a1G10000000XJi2EAG', u'Function_Type_Class__c': u'Office', u'Name': u'PL-010697'}, u'Operating_Name__c': u'001b000000MV2kHAAT', u'Longitude__c': u'55.14960835', u'License_Address_for_Business_Directroy__c': u'Unit No: 403<br>Tiffany Towers<br>Jumeirah Lakes Towers<br>Dubai<br>UAE', u'License_Status__c': u'Active', u'Property_Location__c': u'a1G10000000XJi2EAG', u'attributes': {u'url': u'/services/data/v37.0/sobjects/License__c/a03b0000006h21sAAA', u'type': u'License__c'}, u'Operating_Name__r': {u'attributes': {u'url': u'/services/data/v37.0/sobjects/Account/001b000000MV2kHAAT', u'type': u'Account'}, u'Id': u'001b000000MV2kHAAT', u'Name': u'21ST CENTURY GROUP HOLDINGS LIMITED (BRANCH)'}, u'License_Address__c': u'Unit No: 403<br>Tiffany Towers<br>Plot No: JLT-PH2-W2A<br>Jumeirah Lakes Towers<br>Dubai<br>UAE', u'Id': u'a03b0000006h21sAAA', u'Latitude__c': u'25.07726334', u'Account__r': {u'Saturday_To__c': u'Closed', u'Tuesday_From__c': u'08:00', u'Friday_From__c': u'Closed', u'Phone_BD__c': u'+97144269021', u'Monday_From__c': u'08:00', u'Monday_To__c': u'17:00', u'Publishing_agreement_for_BD__c': u'Publish all details in DMCC online/printed content', u'Company_Official_Email_Address__c': u'bhavani@areefinvestments.com', u'Company_Website_Address__c': u'www.areefinvestments.com', u'Operating_Time_to_regular__c': u'17:00', u'Friday_To__c': u'Closed', u'Tuesday_To__c': u'17:00', u'Wednesday_To__c': u'17:00', u'Wednesday_From__c': u'08:00', u'Thursday_To__c': u'17:00', u'Saturday_From__c': u'Closed', u'attributes': {u'url': u'/services/data/v37.0/sobjects/Account/001b000000MV2kHAAT', u'type': u'Account'}, u'Thursday_From__c': u'08:00', u'Id': u'001b000000MV2kHAAT', u'Operating_Time_from_regular__c': u'08:00', u'Name': u'21ST CENTURY GROUP HOLDINGS LIMITED (BRANCH)'}}, {u'Account__c': u'001b000000MV3NPAA1', u'Building__c': u'55.13603472', u'Property_Location__r': {u'attributes': {u'url': u'/services/data/v37.0/sobjects/Property_Location__c/a1G10000000XHF4EAO', u'type': u'Property_Location__c'}, u'Id': u'a1G10000000XHF4EAO', u'Function_Type_Class__c': u'Flexi Desk', u'Name': u'PL-003652'}, u'Operating_Name__c': u'001b000000MV3NPAA1', u'Account__r': {u'Saturday_To__c': u'Closed', u'Tuesday_From__c': u'10:00', u'Friday_From__c': u'Closed', u'Phone_BD__c': u'+971556099922', u'Monday_From__c': u'10:00', u'Monday_To__c': u'16:00', u'Publishing_agreement_for_BD__c': u'Publish only name and address in DMCC online/printed content', u'Company_Official_Email_Address__c': u'sameh@237communications.com', u'Company_Website_Address__c': u'237communications.com', u'Operating_Time_to_regular__c': u'16:00', u'Friday_To__c': u'Closed', u'Tuesday_To__c': u'16:00', u'Wednesday_To__c': u'16:00', u'Wednesday_From__c': u'10:00', u'Thursday_To__c': u'16:00', u'Saturday_From__c': u'Closed', u'attributes': {u'url': u'/services/data/v37.0/sobjects/Account/001b000000MV3NPAA1', u'type': u'Account'}, u'Thursday_From__c': u'10:00', u'Id': u'001b000000MV3NPAA1', u'Operating_Time_from_regular__c': u'10:00', u'Name': u'237 COMMUNICATIONS DMCC'}, u'License_Status__c': u'Active', u'Property_Location__c': u'a1G10000000XHF4EAO', u'attributes': {u'url': u'/services/data/v37.0/sobjects/License__c/a03b0000006h16xAAA', u'type': u'License__c'}, u'Operating_Name__r': {u'attributes': {u'url': u'/services/data/v37.0/sobjects/Account/001b000000MV3NPAA1', u'type': u'Account'}, u'Id': u'001b000000MV3NPAA1', u'Name': u'237 COMMUNICATIONS DMCC'}, u'License_Address__c': u'Unit No: 2H-05-412<br>Jewellery & Gemplex 2<br>Plot No: DMCC-PH2-J&GPlexS<br>Jewellery & Gemplex<br>DUBAI<br>United Arab Emirates', u'Id': u'a03b0000006h16xAAA'}], u'result_count': 0}
您想要的内容在data[u'sObjects']
中,以获取公司网站:
for d in data['sObjects']:
if 'Company_Website_Address__c' in d['Account__r']:
print(d['Account__r']['Company_Website_Address__c'])
这给你:
www.1on1hrconsulting.com
www.1platinumconcierge.com
www.1000heads.com
www.101parathas.com
www
www.1765hospitality.com
www.1851laundries.com
N.A.
www.areefinvestments.com
237communications.com
您可以看到有些公司没有列出网站,您必须决定如何处理这些网站。如果您只打印d[u'Account__r']
,您就可以看到每个公司的所有信息。您还应该意识到它是一个内部 api,因此请确保您通过抓取他们的网站来违反他们的服务条款,尽管他们可能应该更严格地实现他们的 authToken 逻辑以防止调用 api如果他们不想那么容易被刮掉的话。当您发出请求时,您可以在 Chrome 工具中看到它,但这不是必需的。
关于Python 2.7 BeautifulSoup,网站地址抓取,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39646144/
目前,我有以下设置: A记录: mydomain.com - aaa.aaa.aaa.aaa subdomain.mydomain.com - aaa.aaa.aaa.aaa NS记录: mydoma
有人可以帮助我以最佳方式在流畅的 nHibernate 中映射以下情况吗? Address 类用于 Client 和 Company。如何在 SQL 中最有效地存储它?映射应该是什么样的?我已经考虑过
我正在尝试编写一个 Windows 应用程序,它将在来自 PC 的以太网链接上生成流量。 我想使用 webBrowser 控件不断拉取网页以产生流量。 在这种情况下,我希望每个 webBrowser
我正在编写一个 SIP 堆栈,我需要在消息中插入一个 IP 地址。该地址必须是用于发送消息的地址。我知道目标 IP 并且需要确定将用于发送消息的 NIC(其地址).... 最佳答案 为了扩展 Remy
如何使用 IP 地址获取 MAC 地址,但以下代码不起作用 packet = ARP(op=ARP.who_has,psrc="some ip",pdst = ip) response = srp(p
目前我想知道如何实现对本地无线网络(路由器)的获取请求以获取当前连接到当前连接的 LAN 的所有设备.... 所以我做了一些研究,显然“nmap”是一个终端/命令提示符命令,它将连接的设备返回到本地无
这个问题在这里已经有了答案: 关闭 11 年前。 Possible Duplicates: how to find MAC address in MAC OS X programmatically
我们正在为 ipad 开发一个 iOS 应用程序,它使用 bonjour 与其他设备连接,使用 couchbaseListener 与对等数据库进行复制。我们观察到,每当 [nsnetservice
我创建了 3 个实例,其中 3 个弹性 IP 地址指向这些实例。 我做了 dsc 的 yum 安装:dsc12.noarch 1.2.13-1 @datastax 并且/etc/cassandra/d
我正在尝试获取规模集中所有虚拟机的私有(private) IP 地址列表(没有一个虚拟机故意拥有任何公共(public) IP 地址)。我找到了如何从 az cli 获取此内容,如下所示: az vm
我正在尝试获取规模集中所有虚拟机的私有(private) IP 地址列表(没有一个虚拟机故意拥有任何公共(public) IP 地址)。我找到了如何从 az cli 获取此内容,如下所示: az vm
我正在尝试与该端口上的任何 IP 建立连接。最初,我将其设置为 10.0.0.7,这是我网络上另一台计算机的 IP,因此我可以测试客户端/服务器。但是,我希望它可以与任何计算机一起使用而不必将 IP
作为序言,我开发了自己的 CRM(类似于 SalesForce 或 SAP),其“规模”要小得多,因为它面向服务,而不是销售。我在 Ubuntu 16.04 服务器上使用 MySql 或 MariaD
在我的项目中,我想做如下事情: static void test0(void) { printf("%s [%d]\n", __func__, __LINE__); } static void
我的机器上有两个网卡,配置了两个独立的 IP 地址。两个 IP 地址都属于同一个网络。我是否正确地说,当我创建一个特定于这些 IP 地址之一的套接字时? 更新: 这是我的情况: 我有一个位于 192.
当然,我意识到没有一种“正确的方法”来设计 SQL 数据库,但我想就我的特定场景中的优劣获得一些意见。 目前,我正在设计一个订单输入模块(带有 SQL Server 2008 的 Windows .N
我们将保存大量地址数据(在我公司的眼中,每个客户大约有150.000至500.000行)。 地址数据包含约5列: 名称1 名称2 街(+否) 邮政编码 市 也许以后再添加一些东西(例如电话,邮件等)
好的,我们在生产中实现了 Recaptcha。我们收到错误是因为它无法到达使用该服务所需的 IP 地址。我们为 IP 地址打开一个端口以到达 Google。没问题。我们这样做并显式配置该 IP 地址以
此页面使用 Drupals 联系表发送电子邮件:http://www.westlake.school.nz/contact 问题是,学校员工使用 outlook。当他们收到来自 parent 等的电子
是否可以将用户输入的邮政编码转换为文本框并将其转换为CLLocation?我正在尝试比较其当前位置与地址或邮政编码之间的距离,如果可以从NSString中创建CLLocation,这将很容易。 最佳答
我是一名优秀的程序员,十分优秀!