95 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
Score of 0
1 answer
84 views
Is there a way to set the pyquery user agent string
When scraping HTML with pyquery, is there a way to set the browser string when I retrieve the page?
import pyquery
pqobj = pyquery.PyQuery(url="https://www.google.com/")
html = pqobj.html()
...
- reputation score 27
Score of 0
1 answer
71 views
Extracting URLs from website using Pyquery and requests
I have this code:
from pyquery import PyQuery as pq
import requests
url = "https://www.mba.org/news-and-research/forecasts-and-commentary"
content = requests.get(url).content
doc = pq(...
- reputation score 680
Score of 0
1 answer
116 views
Using PyQuery and Gadget selector to extract URLs from a Website
I have code that only works partially:
from pyquery import PyQuery as pq
import requests
url = SAMPLE_URL.com
content = requests.get(url).content
doc = pq(content)
Latest_Report = doc(".head+ ....
- reputation score 680
Score of 0
1 answer
350 views
How to extract the table values and load into pandas data frame?
I have this code. I am trying to extract data from this website into pandas.
from pyquery import PyQuery as pq
import requests
import pandas as pd
url = "https://www.tsa.gov/travel/passenger-...
- reputation score 680
Score of 1
1 answer
69 views
Why is the output repeated when I parse a string using PyQuery?
Why is the output repeated when I parse a string using PyQuery in Spyder?
Here is my code:
from pyquery import PyQuery as pq
html = """
<ul>
<li>first-item</...
Score of 1
1 answer
289 views
use pyquery to filter html
I'm trying to use pyquery parse html. I'm facing one uncertain issue. My code as below:
from pyquery import PyQuery as pq
document = pq('<p id="hello">Hello</p><p id="...
- reputation score 13
Score of 1
1 answer
518 views
Parse an HTML element using the pyquery library or beautifulsoup. or a different alternative
<div1 class="tag1">
<div2 class="tag2">
<div3 class="tag3">no</div3>
yes
</div2>
</div1>
I want to parse div1 and I get ...
- reputation score 37
Score of 1
2 answers
249 views
Score of 2
1 answer
407 views
make_links_absolute() results in broken absolute URLs
I need to convert relative URLs from a HTML page to absolute ones. I'm using pyquery for parsing.
For instance, this page http://govp.info/o-gorode/gorozhane has relative URLs in the source code, ...
- reputation score 540
Score of 0
1 answer
3051 views
PyQuery and PDFQuery text extraction from next sibling in XML or PDF
I'm trying to extract information from a PDF using the package PDFQuery. The information is not in the same location every time so I need to have a query tag. First, I wrote the function:
def ...
Score of 2
1 answer
261 views
Asynchronous request crawling using Python
I want to crawl the link:
http://data.eastmoney.com/hsgt/index.html
But I found the XHR documents are all without data, but EventSteam, so how can I crawl the complete information of the page.
For ...
- reputation score 47
Score of 0
1 answer
340 views
PyQuery won't return elements on a page
I've set up a Python script to open this web page with PyQuery.
import requests
from pyquery import PyQuery
url = "http://www.floridaleagueofcities.com/widgets/cityofficials?CityID=101"
page = ...
- reputation score 3733
Score of 0
1 answer
37 views
how get groups last column element
How use css selector find the last element in same elements each line on python? I'm using package pyquery.
I has tried tr td:nth-child(2) .score.fill:last-child, tr td:nth-child(2) .score.fill:nth-...
- reputation score 337
Score of 0
1 answer
524 views
PyQuery html how to choose ( second tag ,nth-child)
a='''
<p id="A" class="hello beauty"></p>
<v id="XXX" c=1234>
<p id="B" class="beauty"></p>
<v id="YYY" c=5678>
<p id="C" class="beauty" ></p>
<p id="...
- reputation score 327
Score of 0
2 answers
841 views
Getting elements that have specific attributes by pyquery
I have something like this in HTML page:
<ul>
<li>
<span data-name-en="data1">Value1</span>
<span data-view-en="test1"><span class="fa fa-gear">...