Fix the parser in Python
Hello, there is a parser, here is its code:
https://github.com/0-EternalJunior-0/-autonewsparser
The developer has disappeared somewhere, and we need to make changes to it. First of all, ensure that it is set up to automatically parse news based on a given criterion, because right now it seems that parsing is initiated only on command. If auto-parsing is not set up, it needs to be configured. The project is deployed on our server, and we will provide access to the executor.
Secondly, here is a list of tasks (for improvement) from our developer regarding the API:
---
New necessary API commands:
1.
A command is needed to request N articles based on an arbitrary WHERE query
it can be named anything, type POST
input data:
{
“where”:{
“field1”:”value1”,
“field2”:”value2”,
“field3”:”value3”
},
“limit”:10
}
the limit value can be anything, but it can be restricted to something, for example, 100… if limit is not provided - return 1 article (by default)
in where any fields can be passed, values are written in string (for universality)... I hope “1” and 1 when querying the database will be considered the same value and will not cause an error… before forming the query, all passed parameters in where need to be checked for existence in the table, for example, using
SHOW COLUMNS FROM articles
or
DESCRIBE articles
and if any field does not exist, return an error
based on the data, a query to the database is formed like
SELECT * FROM articles WHERE field1=’value1’ AND field2=’value2’ AND field3=’value3’ LIMIT 10
all WHERE parameters are combined using AND
and all results with all fields are returned in the API request response… there is no need to remove any fields from the response, all that exist should be returned
2.
A command for arbitrary editing of an article by id is needed
it can be named anything, type POST
input data:
{
“set”:{
“field1”:”value1”,
“field2”:”value2”,
“field3”:”value3”
},
“id”:1
}
before forming the query, all passed parameters in set need to be checked for existence in the table, for example, using
SHOW COLUMNS FROM articles
or
DESCRIBE articles
and if any field does not exist, return an error
it is also necessary to block the transmission of id in the set section, and return an error if id is found there
“set”:{
“id”:”2”
},
this is a clear error, id cannot be changed
based on the data, a query to the database is formed like
UPDATE articles SET field1=’value1’, field2=’value2’, field3=’value3’ WHERE id=1
in the API request response, it is enough to return a 200 code for a successful operation, and another code with a description of the error if something goes wrong
IMPORTANT:
I will be adding fields and indexes to the articles table, so both commands need to work with any fields, current and future, and not be limited to the current table structure.
---
Thirdly, it is necessary to figure out how the delete command works, whether articles that were deleted by the command will be parsed again.
Please review the code. There is no need to write the parser from scratch if that's the case.
Просмотрите пожалуйста код. Писать парсер с нуля если что не нужно.
-
121 I have experience working with parsing and FastAPI, I don't see anything difficult in your task.
-
3219 84 0 Ready to take it on.
But we need to clarify the order details, write!
I will implement it with a script in Python.
-
2830 19 0 Hello. I am ready to make edits right now. Please message me privately, we will discuss the details and I am ready to start immediately.
-
414 1 0 Hello, I have been working on developing parsers using different libraries. I suggest we move to private messages to discuss the details of the execution and talk about the deadlines and price.
-
597 2 1 Hello! I will sort out the code, check if auto-parsing is set up, and if not — I will add it. I will refine the API according to your list: I will implement a request for N articles with filtering and editing an article by ID considering the dynamic structure of the database. I will also study the logic of deletion to avoid re-parsing deleted articles. I am ready to start very soon and will carry out the work without unnecessary questions, just write to discuss the details.
-
93973 1266 1 10 Hello. I have experience with Python. I am ready to collaborate. Please contact me.
-
3482 50 0 Good evening
I am ready to take on your work
Write to me, I will be happy to help with your task
I will do it quickly and efficiently
Current freelance projects in the category Data Parsing
Find a product feed (Google Merchant XML) for a website on OpenCart
16 USD
It is necessary to find a direct link to the active product feed (XML) of a competitor for Google Merchant Center Platform (CMS): OpenCart / ocStore Find the original feedRequirements for the result: Working link to the XML file Python, Data Parsing ∙ 3 hours 43 minutes back ∙ 17 proposals |
It is necessary to process the database so that the output files are in the formatThere is a database of the forum and files of the XENFORO 1.6 forum. It is necessary to create an import file for another script, but all fields must be preserved. I provide the specification files and the FAQ file which specify the fields I need. The specification files are for… Databases & SQL, Data Parsing ∙ 9 hours 37 minutes back ∙ 11 proposals |
Parsing products from supermarketsNeed a specialist (parsing + Google Sheets + automation). Goal: Create a system for automatic retrieval and updating of food prices from Silpo and NOVUS supermarkets with data output to Google Sheets. What needs to be implemented: Create a main Google Sheets table with a product… Data Parsing, Information Gathering ∙ 11 hours 33 minutes back ∙ 33 proposals |
LinkedIn mailing
120 USD
LinkedIn Mailing It is necessary to launch a LinkedIn mailing to the specified database. 30,000+ contacts We are waiting for proposals Email Marketing, Data Parsing ∙ 1 day 19 hours back ∙ 9 proposals |
Parsing company emails from a specific industry
113 USD
Find contacts (e-mail, phone number) of companies engaged in the specified business mentioned in this Google document https://docs.google.com/document/d/1_d-iLxLSL3gjRvo1GmUpWNm0Pm5YoKGcEvaiDc_2I0g/edit?usp=sharing The result should be in the form of a table with the following… Data Parsing ∙ 2 days 19 hours back ∙ 31 proposals |