質問編集履歴

2

コードを挿入

2018/11/04 11:56

投稿

goki_gottan
goki_gottan

スコア168

test CHANGED
File without changes
test CHANGED
@@ -28,6 +28,8 @@
28
28
 
29
29
 
30
30
 
31
+ ```
32
+
31
33
  import requests
32
34
 
33
35
  from bs4 import BeautifulSoup
@@ -48,6 +50,14 @@
48
50
 
49
51
 
50
52
 
53
+ コード
54
+
55
+ ```
56
+
57
+
58
+
59
+
60
+
51
61
  ### 試したこと
52
62
 
53
63
 
@@ -59,6 +69,8 @@
59
69
   ※コードはfor文以下を変えております。
60
70
 
61
71
 
72
+
73
+ ```
62
74
 
63
75
  product = soup.find_all("div",class_="res")
64
76
 
@@ -78,13 +90,19 @@
78
90
 
79
91
  j=j.replace("<br>","")
80
92
 
81
- j=j.replace('<a class="cmt fancybox fancyboxAjax" data-param="?       tnum=20181028151541&amp;cnum=3" href="/caat/20181028151541/n3">&gt;&gt;3</a><br/>',"")
93
+ j=j.replace('<a class="cmt fancybox fancyboxAjax" data-param="?tnum=20181028151541&amp;cnum=3" href="/caat/20181028151541/n3">&gt;&gt;3</a><br/>',"")
82
94
 
83
95
  j=j.replace('<a class="cmt fancybox fancyboxAjax" data-param="?tnum=20181028151541&amp;cnum=7" href="/caat/20181028151541/n7">&gt;&gt;7</a><br/>',"")
84
96
 
85
97
 
86
98
 
87
99
  print(j)
100
+
101
+
102
+
103
+ コード
104
+
105
+ ```
88
106
 
89
107
 
90
108
 

1

使用していないコードがあったため削除

2018/11/04 11:56

投稿

goki_gottan
goki_gottan

スコア168

test CHANGED
File without changes
test CHANGED
@@ -64,8 +64,6 @@
64
64
 
65
65
 
66
66
 
67
- #product_div = soup.find('div')
68
-
69
67
  for i in product:
70
68
 
71
69
  j =str(i)