Find Jobs
Hire Freelancers

Using request and cheerio, create a node.js script to login to portal a keep session alive

$30-250 USD

ที่ทำเสร็จแล้ว
โพสต์ เกือบ 6 ปีที่ผ่านมา

$30-250 USD

ชำระเงินเมื่อส่งงาน
We have a target B2B portal secured by username/password. We want a node.js/express script to login to the portal and keep the session alive as long as possible and then log back in if the remote server unavoidably destroys the session. The expected budget for this project is $50. There are follow-up projects available which will ultimately lead to scraping a lot of data out of the remote site and loading the data into MySql. --------------------------------------------------------------------------- THE FOLLOWING INFORMATION IS FOR CONTEXT ONLY AND IS NOT REQUIRED IN THIS STEP/BID The express application will *eventually* provide a route through which we can HTTP query our server which will in turn request a secured page from the remote server (i.e. scrape the remote host) and return data back to the browser: browser <---> *our node.js/expressApp <---> remote server However, THIS IS NOT REQUIRED IN THIS STEP/BID AND IS ONLY EXPLAINED HERE FOR CONTEXT. --------------------------------------------------------------------------- THE SCRIPT SHOULD TAKE THE FOLLOWING OUTLINE: const request = require('request-promise') const express = require('express') var isLoggedIn = async (r) => { var html = await [login to view URL]('[login to view URL]') return [login to view URL]('Your username is:') // only appears if we have an active session } var login = async (r) => { var html = await [login to view URL]('[login to view URL]', {username: 'superuser', password: 'coolpassword'}) if (!await isLoggedIn(r)) throw "Could not login!" // save the session/cookies to the database await [login to view URL](`update cache set cookies = '${[login to view URL]('[login to view URL]')}'`) } var keepalive = async (r) => { await [login to view URL]('[login to view URL]') // resets the idle timeout on remote server setTimeout(keepalive, randomTimeBetween4And6Minutes) } var connect = async () => { // create a session var jar = [login to view URL]() var r = [login to view URL]({jar: jar}) // restore last session/cookies var cookies = await [login to view URL]('select cookies from cache') for (cookie of cookies) { [login to view URL](cookie), '[login to view URL]') } // login if not already logged in if (!isLoggedIn(r)) login(r) keepalive(r) // keeps the session alive } connect() // Express/HTTP application and routes [login to view URL]('/accountNumber', async (req, res, next) => { var html = await [login to view URL]('[login to view URL]') var accountNumber = [login to view URL](/'Your Account Number: (\d+)/)[1] [login to view URL]({status: 'success', accountNumber: accountNumber}) }) [login to view URL](3000) --------------------------------------------------------------------------- REQUIREMENTS: THE SCRIPT SHOULD DO THE FOLLOWING Reference the above sample script pseudocode and see that the following steps are required: * When the express application starts, load cookies stored in MySql from a previous execution, i.e. var jar = [login to view URL]() var cookies = await [login to view URL]('select cookies from cache') for (cookie of cookies) { [login to view URL](cookie), '[login to view URL]') } * The script should check to see if the session it restored from MySql cookies is still a valid/logged in session. Do this by requesting a page that is generally secured and requires a user to be logged in. Look for indicators in the HTTP response that indicate that the session is logged in or not. If the session is not valid, then try to log in again * If we login, then save the new session/cookies to MySql * Keepalive: Request a page periodically to reset the session timeout counter on the server. * A function to look for an indicator in the HTML of whether our session/cookies are still logged in or not. i.e. [login to view URL]('Your username is:') // only appears if we have an active session --------------------------------------------------------------------------- A WORKING COPY OF ONE OF THESE SCRIPTS IS AVAILABLE HERE: [login to view URL]
รหัสโปรเจกต์: 17268052

เกี่ยวกับโปรเจกต์

6 ข้อเสนอ
โปรเจกต์ระยะไกล
ใช้งานอยู่ 6 ปีที่ผ่านมา

กำลังมองหาการสร้างรายได้ใช่ไหม?

ประโยชน์ของการประมูลกับ Freelancer

กำหนดงบประมาณและกรอบเวลาของคุณ
รับเงินจากการงานของคุณ
อธิบายข้อเสนอของคุณในภาพรวม
ลงทะเบียนและเสนอราคาฟรี
หมอบหมายให้:
รูปอวาตาร์ของผู้ใช้
Highly dedicated, experienced. Have experience creating scraping services, processing thousands of press releases per day.
$50 USD ใน 3 วัน
0.0 (0 รีวิว)
0.0
0.0
6 ฟรีแลนซ์กำลังเสนอราคาโดยเฉลี่ย $104 USD สำหรับงานนี้
รูปอวาตาร์ของผู้ใช้
Hi, I have used this technique to scrap data from website When i have scrapped data from website where we need login I have good exp there are several factors with each domain with respect to there security and data policies but every time i managed to logged in and scrap data so i think myself good for this task you can find more details about my skills on profile page too thanks
$166 USD ใน 3 วัน
5.0 (38 รีวิว)
6.8
6.8
รูปอวาตาร์ของผู้ใช้
Hi, I read through the job details extremely carefully and I am absolutely sure that I can do the project very well. Expert in BOTH Backend and Front-end Programming, PHP - OOP, MVC, REST API, HTML/CSS/JAVASCRIPT, Wordpress Theme Integration, Woocommerce/Ecommerce, Magneto,Shopify, Responsive Design, Plugin Development, Adaptive websites, White Hat SEO, Android and IOS App Development. I look forward to a successful working relationship in the future. Kind Regards, Vivek
$50 USD ใน 2 วัน
4.9 (8 รีวิว)
4.8
4.8
รูปอวาตาร์ของผู้ใช้
I have 6 year experience Freelancer,up work,Fiverr & 99design market place I have seen your project that i can to do easily because I have many experience to Graphic Design,Webdesign,Web Develop & programming .So I could create it for you as soon as that easy but how this have done ,,,,please discuses before start job,,,,
$155 USD ใน 3 วัน
5.0 (1 รีวิว)
2.7
2.7

เกี่ยวกับลูกค้า

ปักธงของ UNITED STATES
Denver, United States
5.0
25
ยืนยันวิธีการชำระเงินแล้ว
เป็นสมาชิกตั้งแต่ ธ.ค. 22, 2013

การยืนยันลูกค้า

ขอบคุณ! เราได้ส่งลิงก์สำหรับเครดิตฟรีให้คุณทางอีเมลแล้ว
เกิดข้อผิดพลาดขณะส่งอีเมลของคุณ กรุณาลองอีกครั้ง
โลโก้ Freelancer Thailand / ภาษาไทย ช่วยเหลือและสนับสนุน FreelancerประเภทโปรเจคการประกวดFreelancerองค์กรแพ็กเกจสมาชิกโครงการ Freelancer ชั้นแนวหน้าการจัดการโปรเจคงานในพื้นที่Photo Anywhereหน้าจัดแสดงผลงานAPI สำหรับนักพัฒนาได้รับการยืนยันDesktop App เกี่ยวกับเกี่ยวกับเราวิธีใช้งานความปลอดภัยนักลงทุนแผนผังเว็บไซต์เรื่องราวข่าวออกสื่อทีมรางวัลข่าวประชาสัมพันธ์ร่วมงานกับเรา ข้อกำหนดนโยบายความเป็นส่วนตัวข้อกำหนดและเงื่อนไขนโยบายลิขสิทธิ์ข้อพึงปฏิบัติค่าธรรมเนียมและค่าบริการหุ้นส่วนEscrow.comLoadshiftWarrior Forum แอปโลโก้ Apple App Store โลโก้ Google Play
ไม่สามารถคัดลอกไปยังคลิปบอร์ดได้ โปรดลองอีกครั้งหลังปรับเปลี่ยนการอนุญาต
คัดลอกไปยังคลิปบอร์ดแล้ว
ผู้ใช้ที่ลงทะเบียน งานที่มีการโพสต์ทั้งหมด
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
กำลังโหลดตัวอย่าง
ได้รับอนุญาตสำหรับตำแหน่งทางภูมิศาสตร์
เซสชั่นการเข้าสู่ระบบของคุณหมดอายุและคุณได้ออกจากระบบแล้ว กรุณาเข้าสู่ระบบอีกครั้ง