Skip to content

Commit

Permalink
add okmovieSpider/main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kangvcar committed Dec 26, 2018
1 parent 71bfb66 commit 7147a4c
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 63 deletions.
4 changes: 4 additions & 0 deletions KoreaGirl/.idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions KoreaGirl/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

146 changes: 86 additions & 60 deletions KoreaGirl/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions okmovieSpider/main.py
Expand Up @@ -42,7 +42,7 @@ def getIndexPages(self, url, sumpage):
'''获取需要爬取多少个列表页'''
pageurls = []
ul = "-".join(url.split('-')[:-1])
for page in range(6, sumpage+1):
for page in range(1, sumpage+1):
pageurls.append(ul + "-" + str(page) + ".html")
return pageurls

Expand Down Expand Up @@ -144,10 +144,10 @@ def getSourceCode(self, url):


# ISO-8859-1
ok = okSpider('http://www.okzy.co/?m=vod-index-pg-2.html', 10)
ok = okSpider('http://www.okzy.co/?m=vod-index-pg-2.html', 2)
# ok = okSpider('http://www.okzy.co/?m=vod-type-id-22-pg-1.html', 1)

# url = 'http://www.okzy.co/?m=vod-type-id-1-pg-1.html'
# url = 'http://www.okzy.co/?m=vod-detail-id-22396.html'
# print(requests.get(url).encoding)
# print("-".join(url.split('-')[:-1]))
# print("-".join(url.split('-')[:-1]))

0 comments on commit 7147a4c

Please sign in to comment.