Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8121423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:29:03+00:00 2026-06-06T05:29:03+00:00

I am trying to scrape some data from a web site. This is the

  • 0

I am trying to scrape some data from a web site. This is the kind of thing that I would usually do in Perl, but I would really like to wean myself off Perl. (I’m not dissing Perl; it’s been a valuable tool but I am distressed by how much I still struggle with the language after more than a decade.) As my needs are simple and performance is seldom an issue for me, I want to shift my web scraping to R. I know some R but I have never used RCurl or similar libraries.

The task is to scrape a database of publicly available data. The issue is complicated by my not knowing exactly how to pass the arguments, as I am just looking at the JS source and trying to work out what to include in the RCurl postForm request. The code below does not throw any obvious errors, but neither does it return anything useful.

Q. What am I doing wrong?

[Edited: to reflect changes suggested, but not yet resolved]

require(RCurl)
## -----------> Form:
## http://jamaserv.jama.or.jp/newdb/eng/index.html
## -----------> Result:
## http://jamaserv.jama.or.jp/newdb/eng/prod4/prod4TsMkEntry.html

#POST /newdb/eng/prod4/prod4TsMkEntry.html makerCd=5&additionBase=1&additionInterval=1&chkSelCnd3=0&car4Cd=100005&termFrom=201103&termTo=201203&prod4TsMkEntryForm%3AdoAction=Server&prod4TsMkEntryForm%2Feng%2Fprod4%2Fprod4TsMkEntry.html=prod4TsMkEntryForm

#POST /newdb/eng/prod4/prod4TsMkEntry.html?pass chkSelCnd3=0&prod4TsMkEntryForm%2Feng%2Fprod4%2Fprod4TsMkEntry.html=prod4TsMkEntryForm&makerCd=5&additionBase=1&termTo=201203&prod4TsMkEntryForm%3AdoAction=Server&additionInterval=1&termFrom=201103&car4Cd=100005

x <- postForm('http://jamaserv.jama.or.jp/newdb/eng/prod4/prod4TsMkEntry.html?pass',
              chkSelCnd3 = '0',
              'prod4TsMkEntryForm/eng/prod4/prod4TsMkEntry.html' = 'prod4TsMkEntryForm',
              makerCd = '5',
              additionBase = '1',
              termTo = '201203',
              'prod4TsMkEntryForm:doAction' = 'Server',
              additionInterval = '1',
              termFrom = '201103',
              car4Cd = '100005',
              .opts = curlOptions(
              referer = 'http://jamaserv.jama.or.jp/newdb/eng/prod4/prod4TsMkEntry.html',
              verbose = TRUE,
              header = TRUE,
              followLocation = TRUE,
              useragent = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13'
  )
)

When using a browser the form looks like this:
enter image description here

And the above settings return (on a separate page) this:
enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T05:29:05+00:00Added an answer on June 6, 2026 at 5:29 am

    This turned out to be a far more complex problem that it originally appeared, involving server-side Javascript and all kinds of stuff. It doesn’t seem feasible with the simple approach I used in this question. So, answering my own question and moving on…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am trying to scrape some data from this site : http://laperuanavegana.wordpress.com/ . actually
I'm trying to scrape some information from a web site, but am having trouble
Trying to scrape images and data from a website using Xpath but keeps showing
I am trying to scrape some data from a page with a table based
I am trying to use the HTML Agility pack to scrape some data from
I have some data scraped and processed from the web in this form: >head(dat)
I'm trying to page scrape some DOM that looks like this: <span>text</span> and sometimes
I'm trying to scrape a website using some regex. But the site isn't written
I'm trying to scrape some information from a website but can't find a solution
I am trying to scrape only the test information from a web page which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.