質問編集履歴

3

コードの内容表記が適切に表示されていなかったため変更

2018/04/24 00:23

投稿

abab7200
abab7200

スコア120

test CHANGED
File without changes
test CHANGED
@@ -50,7 +50,7 @@
50
50
 
51
51
  </div>
52
52
 
53
- ``
53
+ ```
54
54
 
55
55
 
56
56
 

2

タイトル変更

2018/04/24 00:23

投稿

abab7200
abab7200

スコア120

test CHANGED
@@ -1 +1 @@
1
- scrapyでrole="button"の要素を取得し、次のページへ遷移させたい
1
+ scrapyでhtml5の要素を取得し、次のページへ遷移させたい
test CHANGED
@@ -1,6 +1,6 @@
1
1
  scrapyでボケてのページの画像を取得するコードを書いています。
2
2
 
3
- その際に次のページに遷移したいので、role="button"の要素を指定したいのですが
3
+ その際に次のページに遷移したいので、html5の role="button"の要素を指定したいのですが
4
4
 
5
5
  取得方法が不明なため、Filtered offsite request となります。
6
6
 

1

ページャーのhtml追加

2018/04/21 08:48

投稿

abab7200
abab7200

スコア120

test CHANGED
File without changes
test CHANGED
@@ -10,6 +10,50 @@
10
10
 
11
11
 
12
12
 
13
+ ページャーのhtml要素
14
+
15
+ ```
16
+
17
+ <div class="pager">
18
+
19
+
20
+
21
+ <button class="btn btn-primary" disabled="disabled">1</button>
22
+
23
+
24
+
25
+ <a href="https://bokete.jp/boke/popular?page=2" class="btn btn-primary">2</a>
26
+
27
+ <a href="https://bokete.jp/boke/popular?page=3" class="btn btn-primary">3</a>
28
+
29
+ <a href="https://bokete.jp/boke/popular?page=4" class="btn btn-primary">4</a>
30
+
31
+ <a href="https://bokete.jp/boke/popular?page=5" class="btn btn-primary">5</a>
32
+
33
+ <a href="https://bokete.jp/boke/popular?page=6" class="btn btn-primary">6</a>
34
+
35
+ <a href="https://bokete.jp/boke/popular?page=7" class="btn btn-primary">7</a>
36
+
37
+ <a href="https://bokete.jp/boke/popular?page=8" class="btn btn-primary">8</a>
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+ <a href="https://bokete.jp/boke/popular?page=2" class="btn btn-primary" role="button">
46
+
47
+ <span class="glyphicon glyphicon-chevron-right"></span>
48
+
49
+ </a>
50
+
51
+ </div>
52
+
53
+ ``
54
+
55
+
56
+
13
57
  コード
14
58
 
15
59
  ```