Questions tagged [lxml] (50)

1
answer

How to host lxml on yandex cloud functions?

You need to write a function which, when it enters the file into S3 would have it being parsed. The difficulty is that all dependencies should be directly in the folder by the script itself and there is no possibility to use a Virtual Environment. And here came the difficulty with the fact that I in no way manage to get to ...
Ted_Ku asked April 8th 20 at 10:03
2
answers

How to put words in my website in Python?

Hi all. Never being parsed up to this point information from websites. There is a need to put words in the array(or the file) But from here you need to put - study-english.info/vocabulary-american-slang.php About how should look the code in Python? (It is desirable to use XPath from lxml)
ayden34 asked April 3rd 20 at 23:59
2
answers

How to obtain text data-url in the a tag?

Please tell me how to get the value in 'data-url'?fname = 'Da Vinci Code' url = f'https://www.kinopoisk.ru/index.php?kp_query={fname}' page = requests.get(url, headers=HEADERS) tree = html.fromstring(page.content) mbu = tree.xpath("//div[@class='element most_wanted']//div[@class='info']//p//text()") print(mbu)
aiyana.Johnston59 asked March 21st 20 at 12:06
0
answer

How to parse data using BeautifulSoup in lxml xpath?

Good day! The selenium library is a very convenient way to pull data from the Internet pages using the search by xpath. I wanted to know is there a similar possibility when using the library BeautifulSoup and lxml parser? If Yes, give a reference where to esteem, please. PS. while going to search/read the documentation.....
Cassidy_Bailey asked March 19th 20 at 18:55
1
answer

LXML: how to get all child elements of a certain type?

Parse XML file using LXML (Python). File contains user attributes, and each user can have multiple child image images:<user internal-id="1233232323"> <name>Alex</name> <age>23</age> <image id="1">http://example.com/images/img1.jpg</image> <image id="2">http://example.com/ima...
lacey.Tow asked March 19th 20 at 10:14
1
answer

How to find the element in the xml page of VK (method xpath() in Python doesn't find, or is set incorrectly xpath path)?

Task - the link to the page to put the VC and download all profile photos. 1) the Link: https://vk.com/id1 2) the Program jumps to the profile pictures: https://vk.com/id1?z=albums1 3) Further parses each photo. For example, you need this: https://vk.com/id1?z=photo1_456315566%2Fphotos1import requests from lxml import html ...
Elmo asked March 18th 20 at 20:39
2
answers

How to get string from HTML?

There is an element:<td class="text" align="center" style="font-family: Arial, sans-serif; color:#646464; font-size: 13px; line-height: 15px; text-decoration: line-through;"> <span style="font-family: Arial, sans-serif; color:#646464; font-size: 13px; line-height: 15px; text-decoration: line-through;"> 53.63 P...
Sydnee_Ri asked March 16th 20 at 14:45
2
answers

How to get link from href='link'?

For example, there is an element:<a href="http://example.com/elsie" class="sister" id="link1">Elsie</a> How do I get into a variable http://example.com/elsie? Read the official documentation, the answer is not found.
Kaia_Metz asked March 16th 20 at 14:43
2
answers

How to get all mismatch errors xml file xsd schema?

Puzzled validate the xml file with its xsd schema. For this purpose use python c module lxml. Code the following:import os import sys import datetime from lxml import etree rootDir = os.path.dirname(sys.argv[0]) scheme = '{}\\{}'.format(rootDir,'ListForRating_v03\ListForRating_v03.xsd') pathToXML = '{}\\{}'.format(rootDir,...
Hans_McGlynn51 asked March 15th 20 at 22:42
1
answer

Are there any alternative libraries?

There is a script in Python with libraries OpenSSL signxml, lxml. Need alternative library in C++. What prompt?
Rudy.Dick asked March 13th 20 at 16:31