안녕하세요! 자바스크립트/HTML에 공부를 하고 있는데 헤메고 있습니다 ㅠㅠ

leopine의 이미지

안녕하세요!

제가 연습삼아서 네이버 쇼핑 홈페이지 소스를 파싱해보려고하는데요,

그 소스를 페이지를 넘겨가면서 정보를 받아서 txt파일로 저장하는 것을 해보려고 합니다.

그러려면 일단 소스를 페이지 넘기면서 볼 수 있어야하는데요,

참고할 홈페이지가 javascript 를 이용해서 javascript_:changePage(페이지번호); <<이런식으로 게시판의 페이지를 바꾸더라고요

그래서 모니터로볼때는 분명히 2페이지가 제대로 바뀌어 나왔는데, 소스보기를 하면 아직도 1페이지의 정보를 가지고 있네요...

혹시 javascript로 변경된 소스, 이걸 볼 순 없을까요?

document.documentElement.inner-HTML이란 걸 찾아보긴 했는데, 제가 자바스크립트는 몰라서요 ㅠㅠ 저거 JAVA에서 연동해서 쓸 순 없을까요... ㅠㅠㅠ

allinux의 이미지

네이버 쇼핑에서 상품 리스팅은 페이지를 이동할 때는 Ajax 를 사용하고 있습니다.
파이어폭스의 firebug나 크롬의 개발자도구를 사용하여 확인해보실 수 있습니다.

또한 아무리 자바스크립트로 무엇을 한다 해도 페이지 번호는 get/post 로 넘기는 변수값에 지나지 않습니다.
해당 페이지 변수 값을 이용하여 데이터(일반적으로 rdbms에서 query등)를 가져오기 때문입니다.

네이버 쇼핑에 한해
http://shopping.naver.com/search/all_search.nhn?where=all&query=LG%C0%FC%C0%DA&cat_id=0114&pagingIndex=1
http://shopping.naver.com/search/all_search.nhn?where=all&query=LG%C0%FC%C0%DA&cat_id=0114&pagingIndex=2
라는 식으로 pagingIndex 값을 원하는 페이지 값을 명시적으로 주면 Ajax를 사용하지 않고 해당 페이지 정보를 보여줍니다.(물론 마우스 클릭으로 페이지를 이동할시에는 Ajax를 사용합니다.)

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.