Scrape data from woocommerce to multiple APIs

Closed Posted 4 years ago Paid on delivery
Closed Paid on delivery

1. Get a Value from Wordpress Woocommerce product backend post_meta, this value is made by a plugin.

2. Deconstruct that value into 4 variables to use and store them in a database. The 4 variables are separated by a :

Example

[login to view URL]:3738495:839423

[login to view URL] - This is the sub-domain

3127 - This is the location and can be 2 values only the key is below

3127 = NYC

3128 = United Kingdom

3738495 - This is the username

839423 - This is the password

3. Get 2 date & time values and store them with the post_meta from step 2, these are in the product description. Please see file attachments for how the data is showed. After this is done we have now completed one product. The script will need to check the next product for both values (post meta and times).

The values we need to store for date and time are:

Action Date Time Time Zone

Activate 04/12/19 10:00 AM EST

Deactivate 04/12/19 11:00 AM EST

4. Steps 1-3 will need to be done on all products in my woocommerce store, there are only about 7 of them that contain both post_meta and the date and time. So I would like this to run every 6 hours automatically checking if any data has changed. The values do update every so often so they will need to be updated if they do.

5. Now that we have values stored in our database we will need a second script to cross check the database with upcoming Activate times. 2 hours before an upcoming Activate time and date we will need to fire off some API calls.

6. 2 hours before our activate time from above, the following will now happen.

6A. Create a VPS from a snapshot (preconfigured already made backup) via api call, the location of where we will make the VPS depends on the location from post meta which can be seen in step 2.

API docs: [login to view URL]

6B. Get the IP address from the new VPS we have made and point it to our subdomain [login to view URL] VIA api API option

--data '{"type":"A","name":"a1","content":"$IPfromVPSmade","ttl":{},"priority":10,"proxied":false}'

API call: [login to view URL]

6C. Add IP from VPS to whitelist

* Add IPs:

Curl Example

GET curl -v [login to view URL]${EMAIL}/${PASS}?ips=ip1 !important;ip2 !important;ipn

7. We need to now run some commands on the remote VPS we made.

Command 1. (this command will add the username and password from the database that we stored earlier to our password file)

htpasswd -b /etc/squid/squid_passwd 3738495 839423

Command 2. (edit our config file with the activation time and deactivate time)

File location is: /etc/squid/[login to view URL]

On line 38 of this file here is the line we need to change

acl Activationtime time 00:00-23:59

Change to

acl Activationtime time 10:00-11:00

Note: The server time is in UST so we can either convert the time from EST our database to UST or change the server time to EST.

Our site has different time zones listed for activation so we need a solution to update the times. I think the best way is to change the remote server time to match the correct time zone. Should be able to do this with one line of code.

Command 3.

/usr/sbin/squid -k reconfigure

8. When the time reaches the Deactivate Time, we will need to do the following

Run the command on the VPS

sarg -x -e atcproxys@[login to view URL]

Delete our VPS via API call

[login to view URL]

Remove DNS entry we made

[login to view URL]

* Remove IP from whitelist:

Curl Example

GET curl -v [login to view URL]${EMAIL}/${PASS}?ips=ip1 !important;ip2 !important;ipn

Engineering MySQL PHP Software Architecture WordPress

Project ID: #19200830

About the project

28 proposals Remote project Active 4 years ago

28 freelancers are bidding on average $620 for this job

kabirchy

Hi there, I have checked your project brief very carefully and can develop necessary WP plugin to read your Woocommerce data and take necessary actions. I have several years of experience designing and developing web More

$1000 USD in 20 days
(1239 Reviews)
9.3
uhjk

Until here: " 7. We need to now run some commands on the remote VPS we made." it was very clear. I didn't do this one before, simple php exec will work for this? I liked the project :)

$600 USD in 4 days
(953 Reviews)
8.3
evgendob

Hello. Wordpress development expert ready to help you with data scraping. I have more 400 good reviews and more 9 years of development experience behind, so all will be done with best quality and timeframe. Free bug More

$555 USD in 10 days
(547 Reviews)
7.9
pofilippov

Hi, I am a Linux and PHP expert. I can make your task. My programming experience is 9 years. I did projects both in the development team and alone. I am pleased to perform work of any complexity and type. Be sure th More

$513 USD in 4 days
(40 Reviews)
6.8
umg536

Hi there, I have read your project description and i'm confident i can do this project for you perfectly.I still have a few questions. please leave a message on my chat so we can discuss the budget and deadline of the More

$555 USD in 3 days
(30 Reviews)
6.4
ferozstk

Hello, After reading your project details I believe I'm suitable for this project. As I'm expert on it with more than 7 years experience. Please feel free to contact me. I am looking forward to hear from you. More

$300 USD in 4 days
(128 Reviews)
6.7
Aloshya

Scrapping Expert here. Scrapping with C#, Python, NodeJs are all prepared. I have seen your requirement and fully confident. I am perfectly sure that i can make you satisfy with perfect result.

$1000 USD in 10 days
(16 Reviews)
6.7
jonyahmed105

Hi I can do this task perfectly. and I understood. Thanks

$733 USD in 10 days
(161 Reviews)
6.5
lexsystems

Hey. I am Alex and I am a PHP developer. I worked with a lot of different requests so far and I am familiar with both the API and the wordpress database structure. I can dump data from both the API and by running myql More

$305 USD in 4 days
(20 Reviews)
5.1
developerphp2007

Hi, I read your description very carefully, I am expert on web-scraping, API, I can complete your project 100% perfectly.. I can complete your Woocommerce data related project 100% perfectly. Please check my pas More

$250 USD in 15 days
(26 Reviews)
5.3
kumarsaloni

Hi There, Greetings. So the location will only be of 2 values with NYC or UK and there is NO possibility of any third one...yeah? I think updating the remote server's time zone will be easier and the smarter thi More

$888 USD in 10 days
(7 Reviews)
5.1
raminde

Have over 10 years of experience in data mining/ Web scrapping/ Scraping Bots/ Chrome/Opera Extensions I have done it all. Tell us your source and we will put it in excel for you, Or we can even give you filtered resul More

$277 USD in 10 days
(6 Reviews)
5.0
AITSoft

Hello, how are you? I have checked the details. I have rich experience with Engineering, MySQL, PHP, Software Architecture, WordPress. Please initiate the chat so we can discuss this job in detail.

$555 USD in 13 days
(13 Reviews)
4.2