-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Job postings + ProductList extraction #103
Conversation
Extend the Search Queries description
It is useful as-is, but there are known issues - e.g. JS pagination is common on job websites, and it's not handled by the spider, so on many websites it can only extract jobs from the first page.
Mark job posting template as experimental
Job postings + ProductList extraction
|
||
def get_ephemeral_port(): | ||
s = socket.socket() | ||
s.bind(("", 0)) |
Check warning
Code scanning / CodeQL
Binding a socket to all network interfaces Medium test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI about 1 month ago
To fix the problem, we need to bind the socket to a specific interface instead of all interfaces. This can be achieved by replacing the empty string (""
) with a specific IP address. In this case, we will use 127.0.0.1
to bind the socket to the localhost interface, which limits access to the local machine only.
The changes will be made in the get_ephemeral_port
function in the tests/mockserver.py
file. Specifically, we will update the s.bind
call on line 18 to use 127.0.0.1
instead of an empty string.
-
Copy modified line R18
@@ -17,3 +17,3 @@ | ||
s = socket.socket() | ||
s.bind(("", 0)) | ||
s.bind(("127.0.0.1", 0)) | ||
return s.getsockname()[1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not fixing it here; the intention of PR was to merge changes to the main branch.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #103 +/- ##
==========================================
- Coverage 95.39% 95.36% -0.04%
==========================================
Files 25 26 +1
Lines 2454 2609 +155
==========================================
+ Hits 2341 2488 +147
- Misses 113 121 +8
|
I merged it in a wrong branch initially :)