티스토리 뷰
<전송 블럭 : Python>
data1 = {
'RequestType': 'InsertArticles',
'KeywordID': keywordID,
'Tablename':tableName,
'CollectedArticles':json.dumps(articleList)
}
res1 = requests.post(self.ServerURL, headers=self.REQUESTHEADER, data=data1)
<수신 블럭 : PHP>
echo "Inserting articles ...<br>";
$KeywordID = $_POST['KeywordID'];
$Tablename = $_POST['Tablename'];
$Datas1 = $_POST['CollectedArticles'];
$Datas1J = json_decode($Datas1, true);
foreach($Datas1J as $data1j){
$AI1 = new cArticleInfo();
$AI1->TABLENAME = $Tablename;
$AI1->URLAddress = $data1j['address'];
$AI1->KeywordID = $KeywordID;
$rst2 = $AI1->LoadArticles($conn0);
if($rst2 != NULL) continue;
$AI2 = new cArticleInfo();
$AI2->TABLENAME = $Tablename;
$AI2->SetValuesbyJSON($data1j, $KeywordID);
$AI2->InsertArticle($conn0);
}
반응형
'SWDesk > App' 카테고리의 다른 글
해상 기상 데이터 수집 프로그램 소스 (0) | 2021.03.22 |
---|---|
[Python] Example for Google Drive API (0) | 2021.01.16 |
[Python] Example for Naver Search with Naver-API (0) | 2021.01.08 |
[Python] Example for Naver Search with selenium (0) | 2021.01.05 |
[Python] Example for Google Search with selenium (0) | 2021.01.04 |
반응형
250x250
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 배프
- 치매
- Decorator
- 둎
- Innovations&Hurdles
- DYOV
- badp
- 혁신
- ServantClock
- 심심풀이
- 아두이노
- 심심풀이치매방지기
- 허들
- 전압전류모니터링
- arduino
- 티스토리챌린지
- image
- 치매방지
- BSC
- Video
- bilient
- Innovation&Hurdles
- 혁신과허들
- 전류
- 전압
- 빌리언트
- 오블완
- Hurdles
- Innovations
- 절연형
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
글 보관함