What
I want to scrape vueData below, and I'm trying to resolve this, but still don't discover the way.
a.js
1<script> 2 var Item = function(val, errorMsg, required) { 3 return { 4 val: val, 5 hasError: !!errorMsg, 6 errorMsg: errorMsg, 7 required: !!required 8 } 9 }; 10 window.vueData = { 11 isError: 'false' === 'true', 12 breadcrumb: [{"name":"Top","url":"/"},{"name":"List","url":"/search/companylist/"},{"name":"company1","url":"/search/companydetail/1/"}], 13 pageNo: "1", 14 pageList: [], 15 tRagCorporate : { 16 code: "1", 17 name: "company1", 18 establishDateText: "2017/11/1", 19 ceo: "Smith", 20 employeeCount: "200", 21 capital: "100,000,000", 22 stockOpening: "not opening", 23 salesAmt: "1,000,000,000,000", 24 zipNo: "xxx-yyyy", 25 pref: "Tokyo", 26 city: "Shinjuku", 27}, 28 jobofferList : [ 29 { 30 companyname: "company1", 31 jobName: "Machine Learning Engineer", 32 ability: "machine learning experience", 33 salary: "5,000,000 - 12,000,000", 34 bizPlace: "Tokyo", 35 } 36 ] 37</script>
My processing source code is:
a.py
1from selenium import webdriver 2 3TARGET_SITE = 'https://www.hoge.com/search/companydetail/1' 4 5def main(): 6 companies[1] = 'url': TARGET_SITE 7 8 browser = webdriver.Firefox(executable_path='/path/to/geckodriver') 9 browser.get(companies[1]['url']) 10 r = browser.find_element_by_class_name('a-table') 11 print(r) 12end 13 14if __name__ == '__main__': 15 main()
tRagCorporate
will be set at the table class of a-table
.
I tried to scrape after composed this table, but I can't.
After this, searching for scraping vue data, but can't get info...
Please give me solution, or some hints if you have.
Supplement
python 3.7
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/11/18 10:20 編集
2018/11/18 10:44