Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WordPress and Python Script
#1
Is it possible to put a Python Script on a WordPress site.

I made a web-scraper in Python and would like the web-scraper to automatically post new data to a WordPress website. I googled Python and WordPress through a Boolean search and not much came up, or at least nothing simple, widely used, and documented well. Is WordPress the best solution for posting data from a Python web-scraper online?

I have about a year of experience in Python, but none whatsoever in web development. Can anyone point me in the right direction for this?

I am just trying to put data from a web-scraper onto a site.


Thank you in advance.
Reply
#2
Not sure if that is what you want, but you can post to Wordpress using their v2 RestAPI. And there is at least one python wrapper - https://pypi.org/project/wordpress-api/
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
I meant to say post without having to hit refresh. I was looking into something like server sent events. I don't want people who use my site to have to hit 'F5' every 2 seconds. Wanted it to happen automatically and have new data push old data down in an html table. I think NameCheap might have something like this. I think a Python "Web App" may be what I am looking for here:

https://www.namecheap.com/support/knowle...python-app
Reply
#4
(Jan-06-2019, 09:10 AM)Corate Wrote: meant to say post without having to hit refresh. I was looking into something like server sent events. I don't want people who use my site to have to hit 'F5' every 2 seconds.
I think that is not python problem, but wordpress - i.e. is it possible to have wordpress page/post auto-refresh. I think if user has loaded page in browser, if it doesn't refresh itself (i.e. initiate refresh from client side one way or another) it will stay unchanged, no matter what changes were made on the server.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Is there a *.bat DOS batch script to *.py Python Script converter? pstein 3 3,181 Jun-29-2023, 11:57 AM
Last Post: gologica
  How to kill a bash script running as root from a python script? jc_lafleur 4 5,875 Jun-26-2020, 10:50 PM
Last Post: jc_lafleur
  crontab on RHEL7 not calling python script wrapped in shell script benthomson 1 2,288 May-28-2020, 05:27 PM
Last Post: micseydel
  Package python script which has different libraries as a single executable or script tej7gandhi 1 2,617 May-11-2019, 08:12 PM
Last Post: keames
  Wordpress Faiyaz 10 5,560 Sep-21-2018, 12:32 PM
Last Post: gruntfutuk
  wordpress-python-xmlrpc. I can import 1 file. How do I import the entire folder? SamLearnsPython 0 3,257 Jul-05-2018, 06:21 AM
Last Post: SamLearnsPython
  How to run python script which has dependent python script in another folder? PrateekG 1 3,148 May-23-2018, 04:50 PM
Last Post: snippsat
  How to call one python script and use its output in another python script lravikumarvsp 3 32,385 May-16-2018, 02:08 AM
Last Post: lravikumarvsp
  Check Python version from inside script? Run Pythons script in v2 compatibility mode? pstein 2 9,826 Jul-07-2017, 08:59 AM
Last Post: snippsat
  Cant pass corect variables to python script in bash script neradp 3 6,187 Nov-05-2016, 01:26 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020